[Xfce4-commits] [xfce/xfce4-panel] 01/01: Fix drag and drop for internal plugins (Bug #13642)
noreply at xfce.org
noreply at xfce.org
Wed Jun 21 23:56:12 CEST 2017
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 5a54105b14e46bdace52917002267e97ebb21166
Author: Peter de Ridder <peter at xfce.org>
Date: Wed Jun 21 23:44:10 2017 +0200
Fix drag and drop for internal plugins (Bug #13642)
Place the move signal in idle source, giving time to pop down.
---
libxfce4panel/xfce-panel-plugin.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/libxfce4panel/xfce-panel-plugin.c b/libxfce4panel/xfce-panel-plugin.c
index 72ab727..d4e0597 100644
--- a/libxfce4panel/xfce-panel-plugin.c
+++ b/libxfce4panel/xfce-panel-plugin.c
@@ -1001,15 +1001,29 @@ xfce_panel_plugin_button_press_event (GtkWidget *widget,
+static gboolean
+xfce_panel_plugin_idle_move (XfcePanelPlugin *plugin)
+{
+ panel_return_val_if_fail (XFCE_IS_PANEL_PLUGIN (plugin), FALSE);
+ panel_return_val_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (plugin), FALSE);
+
+ /* move the plugin */
+ xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (plugin),
+ PROVIDER_SIGNAL_MOVE_PLUGIN);
+
+ return FALSE;
+}
+
+
+
static void
xfce_panel_plugin_menu_move (XfcePanelPlugin *plugin)
{
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN (plugin));
panel_return_if_fail (XFCE_IS_PANEL_PLUGIN_PROVIDER (plugin));
- /* move the plugin */
- xfce_panel_plugin_provider_emit_signal (XFCE_PANEL_PLUGIN_PROVIDER (plugin),
- PROVIDER_SIGNAL_MOVE_PLUGIN);
+ /* wait for the popup to go down */
+ g_idle_add (xfce_panel_plugin_idle_move, plugin);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list