aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDan Nicolaescu2008-05-21 06:32:45 +0000
committerDan Nicolaescu2008-05-21 06:32:45 +0000
commit6aac1c03b854dcb0cd929ea591815d8f0a38f1b2 (patch)
tree767899a70c26e182e4735c70250d2005f0eae286 /src
parentb9fb2c4543e372336d7c96735e6d3202989d843d (diff)
downloademacs-6aac1c03b854dcb0cd929ea591815d8f0a38f1b2.tar.gz
emacs-6aac1c03b854dcb0cd929ea591815d8f0a38f1b2.zip
(x_set_frame_alpha): Move declarations before
statements.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xterm.c12
2 files changed, 11 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 24bd2eed4e4..fc6287cccb7 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12008-05-21 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * xterm.c (x_set_frame_alpha): Move declarations before
4 statements.
5
12008-05-21 Seiji Zenitani <zenitani@mac.com> 62008-05-21 Seiji Zenitani <zenitani@mac.com>
2 Ryo Yoshitake <ryo@shiftmode.net> 7 Ryo Yoshitake <ryo@shiftmode.net>
3 8
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)
467 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 467 struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
468 Display *dpy = FRAME_X_DISPLAY (f); 468 Display *dpy = FRAME_X_DISPLAY (f);
469 Window win = FRAME_OUTER_WINDOW (f); 469 Window win = FRAME_OUTER_WINDOW (f);
470 double alpha = 1.0;
471 double alpha_min = 1.0;
472 unsigned int opac;
473
470 if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc) 474 if (FRAME_X_DISPLAY_INFO (f)->root_window != FRAME_X_OUTPUT (f)->parent_desc)
471 /* Since the WM decoration lies under the FRAME_OUTER_WINDOW, 475 /* Since the WM decoration lies under the FRAME_OUTER_WINDOW,
472 we must treat the former instead of the latter. */ 476 we must treat the former instead of the latter. */
473 win = FRAME_X_OUTPUT(f)->parent_desc; 477 win = FRAME_X_OUTPUT(f)->parent_desc;
474 478
475 double alpha = 1.0, alpha_min = 1.0;
476
477 if (dpyinfo->x_highlight_frame == f) 479 if (dpyinfo->x_highlight_frame == f)
478 alpha = f->alpha[0]; 480 alpha = f->alpha[0];
479 else 481 else
@@ -489,7 +491,7 @@ x_set_frame_alpha (f)
489 else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0) 491 else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0)
490 alpha = alpha_min; 492 alpha = alpha_min;
491 493
492 unsigned int opac = (unsigned int)(alpha * OPAQUE); 494 opac = (unsigned int)(alpha * OPAQUE);
493 495
494 /* return unless necessary */ 496 /* return unless necessary */
495 { 497 {
@@ -508,9 +510,7 @@ x_set_frame_alpha (f)
508 return; 510 return;
509 } 511 }
510 else 512 else
511 { 513 XFree ((void *) data);
512 XFree ((void *) data);
513 }
514 } 514 }
515 515
516 XChangeProperty (dpy, win, XInternAtom (dpy, OPACITY, False), 516 XChangeProperty (dpy, win, XInternAtom (dpy, OPACITY, False),