[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 08/28: Use gdk_window_get_device_position instead of _get_pointer
noreply at xfce.org
noreply at xfce.org
Thu May 19 20:06:10 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 15707f05dfee8b3839cf94e24bef1be80efc06dd
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Wed May 11 23:43:34 2016 +0200
Use gdk_window_get_device_position instead of _get_pointer
---
panel-plugin/actions.c | 11 +++++++----
x11-clipboard-manager/gsd-clipboard-manager.c | 5 ++++-
2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/panel-plugin/actions.c b/panel-plugin/actions.c
index 579a020..87613da 100644
--- a/panel-plugin/actions.c
+++ b/panel-plugin/actions.c
@@ -114,7 +114,7 @@ static void end_element_handler (GMarkupParseContext
GError **error);
static void text_handler (GMarkupParseContext *context,
const gchar *text,
- gsize text_len,
+ gsize text_len,
gpointer user_data,
GError **error);
@@ -302,7 +302,7 @@ end_element_handler (GMarkupParseContext *context,
static void
text_handler (GMarkupParseContext *context,
const gchar *text,
- gsize text_len,
+ gsize text_len,
gpointer user_data,
GError **error)
{
@@ -687,11 +687,15 @@ clipman_actions_match_with_menu (ClipmanActions *actions,
GtkWidget *mi;
GSList *l, *entries;
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);
if (group == ACTION_GROUP_SELECTION)
{
gint ctrl_mask = 0;
- gdk_window_get_pointer (NULL, NULL, NULL, &state);
+
+ gdk_window_get_device_position (NULL, device, NULL, NULL, &state);
ctrl_mask = state & GDK_CONTROL_MASK;
if (ctrl_mask && actions->priv->skip_action_on_key_down)
{
@@ -995,4 +999,3 @@ clipman_actions_get_property (GObject *object,
break;
}
}
-
diff --git a/x11-clipboard-manager/gsd-clipboard-manager.c b/x11-clipboard-manager/gsd-clipboard-manager.c
index c1e6a59..892b262 100644
--- a/x11-clipboard-manager/gsd-clipboard-manager.c
+++ b/x11-clipboard-manager/gsd-clipboard-manager.c
@@ -214,8 +214,11 @@ primary_clipboard_store (GsdClipboardManager *manager)
{
GdkModifierType state;
gchar *text;
+ 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);
- 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;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list