mirror of
https://github.com/gnustep/libs-back.git
synced 2025-02-23 20:01:22 +00:00
* Source/x11/XGServerWindow.m: Check for bytes_after_ret in
PropGetCheckProperty. Attempt to improve the window border detection. Based on idea by Tom MacSween <Tom.MacSween@crins-sinrc.ca>
This commit is contained in:
parent
b9e9f461ab
commit
6e797c9e6d
2 changed files with 20 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2018-06-20 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/x11/XGServerWindow.m: Check for bytes_after_ret in
|
||||
PropGetCheckProperty. Attempt to improve the window border detection.
|
||||
Based on idea by Tom MacSween <Tom.MacSween@crins-sinrc.ca>
|
||||
|
||||
2018-05-01 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Headers/x11/XGGeneric.h: Move all atoms in XGGeneric data structure.
|
||||
|
|
|
@ -168,27 +168,36 @@ PropGetCheckProperty(Display *dpy, Window window, Atom hint, Atom type,
|
|||
int tmp;
|
||||
|
||||
if (count <= 0)
|
||||
tmp = 0xffffff;
|
||||
{
|
||||
tmp = 0xffffff;
|
||||
}
|
||||
else
|
||||
tmp = count;
|
||||
{
|
||||
tmp = count;
|
||||
}
|
||||
|
||||
if (XGetWindowProperty(dpy, window, hint, 0, tmp, False, type,
|
||||
&type_ret, &fmt_ret, &nitems_ret, &bytes_after_ret,
|
||||
(unsigned char **)&data)!=Success || !data)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((type != AnyPropertyType && type != type_ret)
|
||||
|| (count > 0 && nitems_ret != (unsigned long)count)
|
||||
|| (bytes_after_ret != 0)
|
||||
|| (format != 0 && format != fmt_ret))
|
||||
{
|
||||
NSLog(@"XGetWindowProperty type %d type_ret %d count %d count_ret %d format %d format_ret %d",
|
||||
type, type_ret, count, nitems_ret, format, fmt_ret);
|
||||
NSLog(@"XGetWindowProperty type %d type_ret %d count %d count_ret %d format %d format_ret %d bytes_after_ret %d",
|
||||
type, type_ret, count, nitems_ret, format, fmt_ret, bytes_after_ret);
|
||||
XFree(data);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (retCount)
|
||||
*retCount = nitems_ret;
|
||||
{
|
||||
*retCount = nitems_ret;
|
||||
}
|
||||
|
||||
return data;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue