Call GDK_DISPLAY_XDISPLAY with a display, not a window. Clean up the
Wed Jan 19 18:57:02 2005 Manish Singh <yosh@gimp.org> * gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Call GDK_DISPLAY_XDISPLAY with a display, not a window. Clean up the function a bit too.
This commit is contained in:
committed by
Manish Singh
parent
85c6f6eb76
commit
b37e0373ef
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jan 19 18:57:02 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Call
|
||||||
|
GDK_DISPLAY_XDISPLAY with a display, not a window. Clean up the
|
||||||
|
function a bit too.
|
||||||
|
|
||||||
Wed Jan 19 17:17:31 2005 Manish Singh <yosh@gimp.org>
|
Wed Jan 19 17:17:31 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Squash
|
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Squash
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jan 19 18:57:02 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Call
|
||||||
|
GDK_DISPLAY_XDISPLAY with a display, not a window. Clean up the
|
||||||
|
function a bit too.
|
||||||
|
|
||||||
Wed Jan 19 17:17:31 2005 Manish Singh <yosh@gimp.org>
|
Wed Jan 19 17:17:31 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Squash
|
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Squash
|
||||||
|
|||||||
@ -1,3 +1,9 @@
|
|||||||
|
Wed Jan 19 18:57:02 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
|
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Call
|
||||||
|
GDK_DISPLAY_XDISPLAY with a display, not a window. Clean up the
|
||||||
|
function a bit too.
|
||||||
|
|
||||||
Wed Jan 19 17:17:31 2005 Manish Singh <yosh@gimp.org>
|
Wed Jan 19 17:17:31 2005 Manish Singh <yosh@gimp.org>
|
||||||
|
|
||||||
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Squash
|
* gdk/x11/gdkwindow-x11.c (gdk_window_get_frame_extents): Squash
|
||||||
|
|||||||
@ -3137,14 +3137,14 @@ gdk_window_get_frame_extents (GdkWindow *window,
|
|||||||
guchar *data;
|
guchar *data;
|
||||||
Window *vroots;
|
Window *vroots;
|
||||||
Atom type_return;
|
Atom type_return;
|
||||||
unsigned int nchildren;
|
guint nchildren;
|
||||||
unsigned int nvroots;
|
guint nvroots;
|
||||||
unsigned long nitems_return;
|
gulong nitems_return;
|
||||||
unsigned long bytes_after_return;
|
gulong bytes_after_return;
|
||||||
int format_return;
|
gint format_return;
|
||||||
int i;
|
gint i;
|
||||||
unsigned int ww, wh, wb, wd;
|
guint ww, wh, wb, wd;
|
||||||
int wx, wy;
|
gint wx, wy;
|
||||||
|
|
||||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||||
g_return_if_fail (rect != NULL);
|
g_return_if_fail (rect != NULL);
|
||||||
@ -3174,14 +3174,15 @@ gdk_window_get_frame_extents (GdkWindow *window,
|
|||||||
|
|
||||||
/* use NETWM_VIRTUAL_ROOTS if available */
|
/* use NETWM_VIRTUAL_ROOTS if available */
|
||||||
display = gdk_drawable_get_display (window);
|
display = gdk_drawable_get_display (window);
|
||||||
root = GDK_WINDOW_XID (gdk_screen_get_root_window (GDK_WINDOW_SCREEN (window)));
|
root = GDK_WINDOW_XROOTWIN (window);
|
||||||
|
|
||||||
nvroots = 0;
|
nvroots = 0;
|
||||||
vroots = NULL;
|
vroots = NULL;
|
||||||
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display),
|
|
||||||
root,
|
if (XGetWindowProperty (GDK_DISPLAY_XDISPLAY (display), root,
|
||||||
gdk_x11_get_xatom_by_name_for_display (display,
|
gdk_x11_get_xatom_by_name_for_display (display,
|
||||||
"_NET_VIRTUAL_ROOTS"),
|
"_NET_VIRTUAL_ROOTS"),
|
||||||
0, 0x7fffffff, False, XA_WINDOW, &type_return,
|
0, G_MAXLONG, False, XA_WINDOW, &type_return,
|
||||||
&format_return, &nitems_return, &bytes_after_return,
|
&format_return, &nitems_return, &bytes_after_return,
|
||||||
&data)
|
&data)
|
||||||
== Success)
|
== Success)
|
||||||
@ -3194,10 +3195,12 @@ gdk_window_get_frame_extents (GdkWindow *window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
xparent = GDK_WINDOW_XID (window);
|
xparent = GDK_WINDOW_XID (window);
|
||||||
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
xwindow = xparent;
|
xwindow = xparent;
|
||||||
if (!XQueryTree (GDK_DISPLAY_XDISPLAY (window), xwindow,
|
|
||||||
|
if (!XQueryTree (GDK_DISPLAY_XDISPLAY (display), xwindow,
|
||||||
&root, &xparent,
|
&root, &xparent,
|
||||||
&children, &nchildren))
|
&children, &nchildren))
|
||||||
goto fail;
|
goto fail;
|
||||||
@ -3217,7 +3220,7 @@ gdk_window_get_frame_extents (GdkWindow *window,
|
|||||||
}
|
}
|
||||||
while (xparent != root);
|
while (xparent != root);
|
||||||
|
|
||||||
if (XGetGeometry (GDK_DISPLAY_XDISPLAY (window), xwindow,
|
if (XGetGeometry (GDK_DISPLAY_XDISPLAY (display), xwindow,
|
||||||
&root, &wx, &wy, &ww, &wh, &wb, &wd))
|
&root, &wx, &wy, &ww, &wh, &wb, &wd))
|
||||||
{
|
{
|
||||||
rect->x = wx;
|
rect->x = wx;
|
||||||
|
|||||||
Reference in New Issue
Block a user