[gtk+] GtkWindow: Use client pointer on pointer-dependent positioning.
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] GtkWindow: Use client pointer on pointer-dependent positioning.
- Date: Thu, 24 Jun 2010 00:31:35 +0000 (UTC)
commit 9c4657fb734c72852f2043ad27ca8e75c2571725
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Jun 8 15:19:32 2010 +0200
GtkWindow: Use client pointer on pointer-dependent positioning.
GTK_WIN_POS_MOUSE and GTK_WIN_POS_CENTER* now work relatively to the client
pointer.
gtk/gtkwindow.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index e09d730..37e1bed 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -5828,11 +5828,13 @@ get_monitor_containing_pointer (GtkWindow *window)
GdkScreen *window_screen;
GdkScreen *pointer_screen;
GdkDisplay *display;
+ GdkDeviceManager *device_manager;
GdkDevice *pointer;
window_screen = gtk_window_check_screen (window);
display = gdk_screen_get_display (window_screen);
- pointer = gdk_display_get_core_pointer (display);
+ device_manager = gdk_display_get_device_manager (display);
+ pointer = gdk_device_manager_get_client_pointer (device_manager);
gdk_display_get_device_state (display, pointer,
&pointer_screen,
@@ -6020,12 +6022,15 @@ gtk_window_compute_configure_request (GtkWindow *window,
gint monitor_num;
GdkRectangle monitor;
GdkDisplay *display;
+ GdkDeviceManager *device_manager;
GdkDevice *pointer;
GdkScreen *pointer_screen;
gint px, py;
display = gdk_screen_get_display (screen);
- pointer = gdk_display_get_core_pointer (display);
+ device_manager = gdk_display_get_device_manager (display);
+ pointer = gdk_device_manager_get_client_pointer (device_manager);
+
gdk_display_get_device_state (display, pointer,
&pointer_screen,
&px, &py, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]