From: Andreas Schwab Date: Mon, 26 May 2008 11:37:42 +0000 (+0000) Subject: (x_set_frame_alpha): Fix type mismatch. X-Git-Tag: emacs-pretest-23.0.90~5291 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f8eb1603d22a837bb2554c7b50a1f2311bd1be3e;p=emacs.git (x_set_frame_alpha): Fix type mismatch. --- diff --git a/src/ChangeLog b/src/ChangeLog index a25f6cb615a..b6180e5a224 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2008-05-26 Andreas Schwab + + * xterm.c (x_set_frame_alpha): Fix type mismatch. + 2008-05-26 Jason Rumney * w32font.c (w32font_text_extents): Zero whole metrics struct first. diff --git a/src/xterm.c b/src/xterm.c index 03f06f33f04..42049c6939e 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -469,8 +469,8 @@ x_set_frame_alpha (f) 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 @@ x_set_frame_alpha (f) 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 @@ x_set_frame_alpha (f) 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;