Commit 6aac1c03 authored by Dan Nicolaescu's avatar Dan Nicolaescu

(x_set_frame_alpha): Move declarations before

statements.
parent b9fb2c45
2008-05-21 Dan Nicolaescu <dann@ics.uci.edu>
* xterm.c (x_set_frame_alpha): Move declarations before
statements.
2008-05-21 Seiji Zenitani <zenitani@mac.com>
Ryo Yoshitake <ryo@shiftmode.net>
......
......@@ -467,13 +467,15 @@ x_set_frame_alpha (f)
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
Display *dpy = FRAME_X_DISPLAY (f);
Window win = FRAME_OUTER_WINDOW (f);
double alpha = 1.0;
double alpha_min = 1.0;
unsigned int opac;
if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc)
/* Since the WM decoration lies under the FRAME_OUTER_WINDOW,
we must treat the former instead of the latter. */
win = FRAME_X_OUTPUT(f)->parent_desc;
double alpha = 1.0, alpha_min = 1.0;
if (dpyinfo->x_highlight_frame == f)
alpha = f->alpha[0];
else
......@@ -489,7 +491,7 @@ x_set_frame_alpha (f)
else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0)
alpha = alpha_min;
unsigned int opac = (unsigned int)(alpha * OPAQUE);
opac = (unsigned int)(alpha * OPAQUE);
/* return unless necessary */
{
......@@ -508,9 +510,7 @@ x_set_frame_alpha (f)
return;
}
else
{
XFree ((void *) data);
}
XFree ((void *) data);
}
XChangeProperty (dpy, win, XInternAtom (dpy, OPACITY, False),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment