mirror of
https://github.com/gnustep/libs-back.git
synced 2025-04-22 15:31:14 +00:00
Check for success explicitly
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@16876 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
75fd47580b
commit
687e3750f0
2 changed files with 8 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-06-06 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Source/x11/XGServerWindow.m (setWindowHintsForStyle): Specifically
|
||||
check for success of XGetWindowProperty call.
|
||||
|
||||
2003-05-25 Adam Fedor <fedor@gnu.org>
|
||||
|
||||
* Version 0.8.6
|
||||
|
|
|
@ -201,7 +201,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
|||
MwmHints *hints;
|
||||
BOOL needToFreeHints = YES;
|
||||
Atom type_ret;
|
||||
int format_ret;
|
||||
int format_ret, success;
|
||||
unsigned long nitems_ret;
|
||||
unsigned long bytes_after_ret;
|
||||
static Atom mwhints_atom = None;
|
||||
|
@ -211,14 +211,14 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
|
|||
mwhints_atom = XInternAtom (dpy,_XA_MOTIF_WM_HINTS, False);
|
||||
|
||||
/* Get the already-set window hints */
|
||||
XGetWindowProperty (dpy, window, mwhints_atom, 0,
|
||||
success = XGetWindowProperty (dpy, window, mwhints_atom, 0,
|
||||
sizeof (MwmHints) / sizeof (long),
|
||||
False, AnyPropertyType, &type_ret, &format_ret,
|
||||
&nitems_ret, &bytes_after_ret,
|
||||
(unsigned char **)&hints);
|
||||
|
||||
/* If no window hints were set, create new hints to 0 */
|
||||
if (type_ret == None)
|
||||
if (success != Success || type_ret == None)
|
||||
{
|
||||
needToFreeHints = NO;
|
||||
hints = alloca (sizeof (MwmHints));
|
||||
|
|
Loading…
Reference in a new issue