[Xfce4-commits] [xfce/xfwm4] 04/05: Limit size of 32 bits data to 32 bits
noreply at xfce.org
noreply at xfce.org
Mon Jan 5 22:13:23 CET 2015
This is an automated email from the git hooks/post-receive script.
olivier pushed a commit to branch master
in repository xfce/xfwm4.
commit 4f8018faf46be901a361b8b4cebdc43dbcb84eff
Author: Olivier Fourdan <ofourdan at redhat.com>
Date: Mon Jan 5 21:35:57 2015 +0100
Limit size of 32 bits data to 32 bits
Bug: 9888
Keep only the 32 lowest significant bits and ignore Xlib
added signed.
Patch based on a similar fix for Metacity by Dan Winship
<danw at gnome.org>
Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
---
src/events.c | 4 ++--
src/hints.c | 8 ++++++--
2 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/events.c b/src/events.c
index 52db068..1406f00 100644
--- a/src/events.c
+++ b/src/events.c
@@ -1880,7 +1880,7 @@ handlePropertyNotify (DisplayInfo *display_info, XPropertyEvent * ev)
}
else if (ev->atom == display_info->atoms[NET_WM_WINDOW_OPACITY])
{
- TRACE ("client \"%s\" (0x%lx) has received a NET_WM_OPACITY notify", c->name, c->window);
+ TRACE ("client \"%s\" (0x%lx) has received a NET_WM_WINDOW_OPACITY notify", c->name, c->window);
if (!getOpacity (display_info, c->window, &c->opacity))
{
c->opacity = NET_WM_OPAQUE;
@@ -1889,7 +1889,7 @@ handlePropertyNotify (DisplayInfo *display_info, XPropertyEvent * ev)
}
else if (ev->atom == display_info->atoms[NET_WM_WINDOW_OPACITY_LOCKED])
{
- TRACE ("client \"%s\" (0x%lx) has received a NET_WM_OPACITY_LOCKED notify", c->name, c->window);
+ TRACE ("client \"%s\" (0x%lx) has received a NET_WM_WINDOW_OPACITY_LOCKED notify", c->name, c->window);
if (getOpacityLock (display_info, c->window))
{
FLAG_SET (c->xfwm_flags, XFWM_FLAG_OPACITY_LOCKED);
diff --git a/src/hints.c b/src/hints.c
index 8bc5c4b..9cedf06 100644
--- a/src/hints.c
+++ b/src/hints.c
@@ -242,7 +242,7 @@ getHint (DisplayInfo *display_info, Window w, int atom_id, long *value)
FALSE, XA_CARDINAL, &real_type, &real_format, &items_read, &items_left,
(unsigned char **) &data) == Success) && (items_read))
{
- *value = *((long *) data);
+ *value = *((long *) data) & 0xffffffff;
if (data)
{
XFree (data);
@@ -477,7 +477,7 @@ gboolean
getCardinalList (DisplayInfo *display_info, Window w, int atom_id, unsigned long **cardinals_p, int *n_cardinals_p)
{
Atom type;
- int format;
+ int i, format;
unsigned long n_cardinals;
unsigned long bytes_after;
unsigned char *data;
@@ -505,6 +505,10 @@ getCardinalList (DisplayInfo *display_info, Window w, int atom_id, unsigned long
*cardinals_p = cardinals;
*n_cardinals_p = n_cardinals;
+ for (i = 0; i < n_cardinals; i++)
+ {
+ (*cardinals_p)[i] = (*cardinals_p)[i] & 0xffffffff;
+ }
return TRUE;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list