From: Dan Nicolaescu Date: Wed, 21 May 2008 06:32:45 +0000 (+0000) Subject: (x_set_frame_alpha): Move declarations before X-Git-Tag: emacs-pretest-23.0.90~5385 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6aac1c03b854dcb0cd929ea591815d8f0a38f1b2;p=emacs.git (x_set_frame_alpha): Move declarations before statements. --- diff --git a/src/ChangeLog b/src/ChangeLog index 24bd2eed4e4..fc6287cccb7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-05-21 Dan Nicolaescu + + * xterm.c (x_set_frame_alpha): Move declarations before + statements. + 2008-05-21 Seiji Zenitani Ryo Yoshitake diff --git a/src/xterm.c b/src/xterm.c index a02c7b955c8..d1aef140419 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -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),