[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 20/41: Replace gdk_display_get_pointer().

noreply at xfce.org noreply at xfce.org
Sat Aug 20 18:32:34 CEST 2016


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit 1aa9b6f36028fd792ba6747e2fcb8fb3eae3cf77
Author: Graeme Gott <graeme at gottcode.org>
Date:   Tue Aug 9 07:57:25 2016 -0400

    Replace gdk_display_get_pointer().
---
 panel-plugin/window.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/panel-plugin/window.cpp b/panel-plugin/window.cpp
index ed9c8f6..2ef6082 100644
--- a/panel-plugin/window.cpp
+++ b/panel-plugin/window.cpp
@@ -358,7 +358,14 @@ void WhiskerMenu::Window::show(GtkWidget* parent, bool horizontal)
 	else
 	{
 		GdkDisplay* display = gdk_display_get_default();
-		gdk_display_get_pointer(display, &screen, &parent_x, &parent_y, NULL);
+#if GTK_CHECK_VERSION(3,20,0)
+		GdkSeat* seat = gdk_display_get_default_seat(display);
+		GdkDevice* device = gdk_seat_get_pointer(seat);
+#else
+		GdkDeviceManager* device_manager = gdk_display_get_device_manager(display);
+		GdkDevice* device = gdk_device_manager_get_client_pointer(device_manager);
+#endif
+		gdk_device_get_position(device, &screen, &parent_x, &parent_y);
 	}
 
 	// Fetch screen geomtry

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list