diff --git a/po/xfwm4.pot b/po/xfwm4.pot index e98a25c45e75bc5da3a8b981a288d7c136448551..e56f4316d0ece403e0d8759a32b8bbe64e24fa3f 100644 --- a/po/xfwm4.pot +++ b/po/xfwm4.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2003-07-19 09:56+0200\n" +"POT-Creation-Date: 2003-07-20 19:16+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" diff --git a/src/hints.c b/src/hints.c index 627cd63992f32bf3d80fcc1d11c47ebe262ae48d..98104049550576a0083ebdcc46728cea49bc85c8 100644 --- a/src/hints.c +++ b/src/hints.c @@ -200,26 +200,22 @@ getMotifHints (Display * dpy, Window w) int real_format; unsigned long items_read, items_left; long *data = NULL; - PropMwmHints *result; + PropMwmHints *result = NULL; TRACE ("entering getMotifHints"); if ((XGetWindowProperty (dpy, w, motif_wm_hints, 0L, MWM_HINTS_ELEMENTS, - FALSE, AnyPropertyType, &real_type, &real_format, &items_read, - &items_left, (unsigned char **) &data) == Success) && - (items_read)) - { - result = g_new(PropMwmHints, 1); - memset (result, 0, sizeof(PropMwmHints)); - memcpy (result, data, MIN (items_read * real_format / 8, - sizeof (PropMwmHints))); - XFree (data); - return result; - } - else + FALSE, motif_wm_hints, &real_type, &real_format, &items_read, + &items_left, (unsigned char **) &data) == Success)) { - return NULL; + if (items_read >= MWM_HINTS_ELEMENTS) + { + result = g_new(PropMwmHints, 1); + memcpy (result, data, sizeof (PropMwmHints)); + } + XFree (data); } + return result; } unsigned int