[Xfce4-commits] [xfce/xfce4-panel] 01/01: Retain original GDK_CORE_DEVICE_EVENTS setting for plugins (Bug #15044)

noreply at xfce.org noreply at xfce.org
Sun Jun 23 23:06:34 CEST 2019


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 xfce/xfce4-panel.

commit 306856ca04e9626113d9ae3073cd19b808a59a93
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Jun 22 22:32:45 2019 +0200

    Retain original GDK_CORE_DEVICE_EVENTS setting for plugins (Bug #15044)
    
    Previously the panel disabled smooth scrolling for all plugins - and
    therefore unfortunately also for all applications launched through panel
    plugins - because of leave/enter notify spam when hovering the panel.
    With this patch it retains the original setting and passes it down
    correctly to plugins, which should in turn mean applications would get
    the correct setting.
---
 libxfce4panel/xfce-panel-plugin.c | 3 +++
 panel/main.c                      | 8 +++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 4bb6c00..436403c 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -730,6 +730,9 @@ xfce_panel_plugin_init (XfcePanelPlugin *plugin)
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
 #endif
 
+  if (g_getenv ("PANEL_GDK_CORE_DEVICE_EVENTS"))
+    g_unsetenv ("GDK_CORE_DEVICE_EVENTS");
+
   /* hide the event box window to make the plugin transparent */
   gtk_event_box_set_visible_window (GTK_EVENT_BOX (plugin), FALSE);
 }
diff --git a/panel/main.c b/panel/main.c
index 5f6ff08..e9387ef 100644
--- a/panel/main.c
+++ b/panel/main.c
@@ -255,7 +255,13 @@ main (gint argc, gchar **argv)
 #endif
 
   /* Workaround for xinput2's subpixel handling triggering unwanted enter/leave-notify events:
-   * https://bugs.freedesktop.org/show_bug.cgi?id=92681 */
+   * https://bugs.freedesktop.org/show_bug.cgi?id=92681
+   * We retain the original env var in our own custom env var which we use to re-set the
+   * original value for plugins. If the env var is not set we treat that as "0", which is Gtk+'s
+   * default behavior as well. */
+  if (!g_getenv ("GDK_CORE_DEVICE_EVENTS"))
+    g_setenv ("PANEL_GDK_CORE_DEVICE_EVENTS", "0", TRUE);
+
   g_setenv ("GDK_CORE_DEVICE_EVENTS", "1", TRUE);
 
   /* parse context options */

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


More information about the Xfce4-commits mailing list