[gnome-panel/gtk3] Fix use of deprecated gdk_display_get_pointer()
- From: Germán Poó Caamaño <gpoo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel/gtk3] Fix use of deprecated gdk_display_get_pointer()
- Date: Sat, 8 Jan 2011 02:29:47 +0000 (UTC)
commit c5111b57d5241f8e4e9f420df1a904f66fa2e89d
Author: Germán Póo-Caamaño <gpoo gnome org>
Date: Fri Jan 7 18:28:35 2011 -0800
Fix use of deprecated gdk_display_get_pointer()
Replaced gdk_display_get_pointer() by gdk_device_get_position()
https://bugzilla.gnome.org/show_bug.cgi?id=627455
Wanda: when are you going to free me?
Signed-off-by: Germán Póo-Caamaño <gpoo gnome org>
gnome-panel/panel-toplevel.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gnome-panel/panel-toplevel.c b/gnome-panel/panel-toplevel.c
index 24918ac..6127edf 100644
--- a/gnome-panel/panel-toplevel.c
+++ b/gnome-panel/panel-toplevel.c
@@ -1341,9 +1341,13 @@ panel_toplevel_contains_pointer (PanelToplevel *toplevel)
GdkDisplay *display;
GdkScreen *screen;
GtkWidget *widget;
+ GdkDeviceManager *device_manager;
+ GdkDevice *pointer;
int x, y;
display = gdk_display_get_default ();
+ device_manager = gdk_display_get_device_manager (display);
+ pointer = gdk_device_manager_get_client_pointer (device_manager);
widget = GTK_WIDGET (toplevel);
if (!gtk_widget_get_realized (widget))
@@ -1351,7 +1355,7 @@ panel_toplevel_contains_pointer (PanelToplevel *toplevel)
screen = NULL;
x = y = -1;
- gdk_display_get_pointer (display, &screen, &x, &y, NULL);
+ gdk_device_get_position (pointer, &screen, &x, &y);
if (screen != gtk_window_get_screen (GTK_WINDOW (toplevel)))
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]