Updating branch refs/heads/master
         to 7f4c3ffa4f0e7437b4041ab1529c30029bf2d2d0 (commit)
       from 0a278db4248f92652958e3b3a2597ad81157faaf (commit)

commit 7f4c3ffa4f0e7437b4041ab1529c30029bf2d2d0
Author: Mike Massonnet <[email protected]>
Date:   Sat May 7 20:51:08 2011 +0200

    Add option /tweaks/popup-at-pointer
    
    New option in order to popup the menu at the position of the mouse
    pointer, works only if triggerred through xfce4-popup-clipman.

 panel-plugin/plugin.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/panel-plugin/plugin.c b/panel-plugin/plugin.c
index fc025c2..303dd28 100644
--- a/panel-plugin/plugin.c
+++ b/panel-plugin/plugin.c
@@ -424,7 +424,17 @@ cb_popup_message_received (MyPlugin *plugin,
       if (!g_ascii_strcasecmp (XFCE_CLIPMAN_MESSAGE, ev->data.b))
         {
           DBG ("Message received: %s", ev->data.b);
-          plugin_popup_menu (plugin);
+
+          if (xfconf_channel_get_bool (plugin->channel, 
"/tweaks/popup-at-pointer", FALSE))
+            {
+              gtk_menu_popup (GTK_MENU (plugin->menu), NULL, NULL, NULL, NULL,
+                              0, gtk_get_current_event_time ());
+            }
+          else
+            {
+              plugin_popup_menu (plugin);
+            }
+
           return TRUE;
         }
     }
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits

Reply via email to