summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMark McLoughlin <mark@skynet.ie>2002-06-07 02:05:01 +0000
committerMark McLoughlin <mmclouglin@src.gnome.org>2002-06-07 02:05:01 +0000
commit4c547ec4e3ee005d0a2df9c395505ca47864bf1c (patch)
treefe05b58ab64a5929c104e5ffbdb375822a4c5357 /gtk
parent91745dfecd38b7592198c80aa59c97fe8b45f1c9 (diff)
downloadgdk-pixbuf-4c547ec4e3ee005d0a2df9c395505ca47864bf1c.tar.gz
use the RootWindow of this screen for gdk_window_get_pointer.
2002-06-07 Mark McLoughlin <mark@skynet.ie> * gtk/gtkwindow.c: (gtk_window_compute_configure_request): use the RootWindow of this screen for gdk_window_get_pointer.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkwindow.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 70ff43b46..104be1c2f 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -4183,7 +4183,8 @@ gtk_window_compute_configure_request (GtkWindow *window,
gint screen_height = gdk_screen_get_height (window->screen);
int px, py;
- gdk_window_get_pointer (NULL, &px, &py, NULL);
+ gdk_window_get_pointer (gdk_screen_get_root_window (window->screen),
+ &px, &py, NULL);
x = px - w / 2;
y = py - h / 2;
x = CLAMP (x, 0, screen_width - w);