Mercurial > emacs
changeset 95312:a9b4031fa99f
(x_set_frame_alpha): Fix type mismatch.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Mon, 26 May 2008 11:37:42 +0000 |
parents | f4619b245013 |
children | 42018959645c |
files | src/ChangeLog src/xterm.c |
diffstat | 2 files changed, 10 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Mon May 26 11:05:42 2008 +0000 +++ b/src/ChangeLog Mon May 26 11:37:42 2008 +0000 @@ -1,3 +1,7 @@ +2008-05-26 Andreas Schwab <schwab@suse.de> + + * xterm.c (x_set_frame_alpha): Fix type mismatch. + 2008-05-26 Jason Rumney <jasonr@gnu.org> * w32font.c (w32font_text_extents): Zero whole metrics struct first.
--- a/src/xterm.c Mon May 26 11:05:42 2008 +0000 +++ b/src/xterm.c Mon May 26 11:37:42 2008 +0000 @@ -469,8 +469,8 @@ Window win = FRAME_OUTER_WINDOW (f); double alpha = 1.0; double alpha_min = 1.0; - unsigned int opac; - + unsigned long 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. */ @@ -491,7 +491,7 @@ else if (0.0 <= alpha && alpha < alpha_min && alpha_min <= 1.0) alpha = alpha_min; - opac = (unsigned int)(alpha * OPAQUE); + opac = alpha * OPAQUE; /* return unless necessary */ { @@ -502,9 +502,9 @@ XGetWindowProperty(dpy, win, XInternAtom(dpy, OPACITY, False), 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, - (unsigned char **) &data); - if (data != None) - if (*(unsigned int *)data == opac) + &data); + if (actual != None) + if (*(unsigned long *)data == opac) { XFree ((void *) data); return;