[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 12/28: Also use gdk_window_get_device_position in collector

noreply at xfce.org noreply at xfce.org
Thu May 19 20:06:14 CEST 2016


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

ochosi pushed a commit to branch master
in repository panel-plugins/xfce4-clipman-plugin.

commit 8d6f11a93d9877eacfb7b5d14b03388fe784c386
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Thu May 12 00:37:32 2016 +0200

    Also use gdk_window_get_device_position in collector
---
 panel-plugin/collector.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/panel-plugin/collector.c b/panel-plugin/collector.c
index d5e2b96..5af7088 100644
--- a/panel-plugin/collector.c
+++ b/panel-plugin/collector.c
@@ -146,11 +146,14 @@ static gboolean
 cb_check_primary_clipboard (ClipmanCollector *collector)
 {
   GdkModifierType state;
+  GdkDisplay* display = gdk_display_get_default ();
+  GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
+  GdkDevice* device = gdk_device_manager_get_client_pointer (device_manager);
 
   g_return_val_if_fail (GTK_IS_CLIPBOARD (collector->priv->default_clipboard) && GTK_IS_CLIPBOARD (collector->priv->primary_clipboard), FALSE);
 
   /* Postpone until the selection is done */
-  gdk_window_get_pointer (NULL, NULL, NULL, &state);
+  gdk_window_get_device_position (NULL, device, NULL, NULL, &state);
   if (state & (GDK_BUTTON1_MASK|GDK_SHIFT_MASK))
     return TRUE;
 
@@ -386,4 +389,3 @@ clipman_collector_get_property (GObject *object,
       break;
     }
 }
-

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


More information about the Xfce4-commits mailing list