[Xfce4-commits] [panel-plugins/xfce4-clipman-plugin] 01/01: Fix getting modifier in gsd-clipboard-manager (Bug #14642)
noreply at xfce.org
noreply at xfce.org
Sat Feb 29 12:25:47 CET 2020
This is an automated email from the git hooks/post-receive script.
o c h o s i p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-clipman-plugin.
commit 9e9d35997bfab90016155434f79e4337e3bf0a00
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Sat Feb 29 12:23:38 2020 +0100
Fix getting modifier in gsd-clipboard-manager (Bug #14642)
Similar fix as commits 1d8d735d and 12d8423f.
Without this (and with newer GTK3 versions?), a constant stream of
"Gdk-CRITICAL ... gdk_window_get_device_position_double: assertion
'GDK_IS_WINDOW (window)' failed" is emitted.
Co-authored-by: xuzhen <xuzhen at fastmail.com>
Co-authored-by: Stefan Seyfried <seife+dev at b1-systems.com>
---
x11-clipboard-manager/gsd-clipboard-manager.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/x11-clipboard-manager/gsd-clipboard-manager.c b/x11-clipboard-manager/gsd-clipboard-manager.c
index 3cff437..5e343b3 100644
--- a/x11-clipboard-manager/gsd-clipboard-manager.c
+++ b/x11-clipboard-manager/gsd-clipboard-manager.c
@@ -212,7 +212,7 @@ default_clipboard_owner_change (GsdClipboardManager *manager,
static gboolean
primary_clipboard_store (GsdClipboardManager *manager)
{
- GdkModifierType state;
+ GdkModifierType state = 0;
gchar *text;
GdkDisplay* display = gdk_display_get_default ();
#if GTK_CHECK_VERSION (3, 20, 0)
@@ -222,8 +222,10 @@ primary_clipboard_store (GsdClipboardManager *manager)
GdkDeviceManager *device_manager = gdk_display_get_device_manager (display);
GdkDevice *device = gdk_device_manager_get_client_pointer (device_manager);
#endif
+ GdkScreen* screen = gdk_screen_get_default ();
+ GdkWindow * root_win = gdk_screen_get_root_window (screen);
- gdk_window_get_device_position (NULL, device, NULL, NULL, &state);
+ gdk_window_get_device_position (root_win, 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