[Xfce4-commits] [xfce/xfce4-panel] 01/01: pager: Keep panel visible on drag and drop (Bug #15703)

noreply at xfce.org noreply at xfce.org
Sat Aug 3 22:37:57 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 95319248145b5506f5a639c7ccdd7732772d74bd
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date:   Sat Jul 13 22:58:18 2019 +0200

    pager: Keep panel visible on drag and drop (Bug #15703)
---
 plugins/pager/pager.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/plugins/pager/pager.c b/plugins/pager/pager.c
index 8d8565a..40cc7fa 100644
--- a/plugins/pager/pager.c
+++ b/plugins/pager/pager.c
@@ -54,6 +54,12 @@ static void     pager_plugin_set_property                 (GObject           *ob
                                                            GParamSpec        *pspec);
 static gboolean pager_plugin_scroll_event                 (GtkWidget         *widget,
                                                            GdkEventScroll    *event);
+static void     pager_plugin_drag_begin_event             (GtkWidget         *widget,
+                                                           GdkDragContext    *context,
+                                                           gpointer           user_data);
+static void     pager_plugin_drag_end_event               (GtkWidget         *widget,
+                                                           GdkDragContext    *context,
+                                                           gpointer           user_data);
 static void     pager_plugin_screen_changed               (GtkWidget         *widget,
                                                            GdkScreen         *previous_screen);
 static void     pager_plugin_construct                    (XfcePanelPlugin   *panel_plugin);
@@ -361,6 +367,32 @@ pager_plugin_scroll_event (GtkWidget      *widget,
 
 
 static void
+pager_plugin_drag_begin_event (GtkWidget      *widget,
+                               GdkDragContext *context,
+                               gpointer        user_data)
+{
+  PagerPlugin *plugin = user_data;
+
+  panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
+  xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (plugin), TRUE);
+}
+
+
+
+static void
+pager_plugin_drag_end_event (GtkWidget      *widget,
+                             GdkDragContext *context,
+                             gpointer        user_data)
+{
+  PagerPlugin *plugin = user_data;
+
+  panel_return_if_fail (XFCE_IS_PAGER_PLUGIN (plugin));
+  xfce_panel_plugin_block_autohide (XFCE_PANEL_PLUGIN (plugin), FALSE);
+}
+
+
+
+static void
 pager_plugin_screen_layout_changed (PagerPlugin *plugin)
 {
   XfcePanelPluginMode mode;
@@ -391,6 +423,10 @@ pager_plugin_screen_layout_changed (PagerPlugin *plugin)
 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
       plugin->ratio = (gfloat) gdk_screen_width () / (gfloat) gdk_screen_height ();
 G_GNUC_END_IGNORE_DEPRECATIONS
+      g_signal_connect_after (G_OBJECT (plugin->pager), "drag-begin",
+                              G_CALLBACK (pager_plugin_drag_begin_event), plugin);
+      g_signal_connect_after (G_OBJECT (plugin->pager), "drag-end",
+                              G_CALLBACK (pager_plugin_drag_end_event), plugin);
     }
   else
     {

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


More information about the Xfce4-commits mailing list