[Xfce4-commits] <xfdesktop:master> Added the root menu popup when there are no icons shown on the desktop.
Eric Koegel
noreply at xfce.org
Mon Mar 5 19:30:21 CET 2012
Updating branch refs/heads/master
to bae29238768a138626db145600f424b80bb171ce (commit)
from ada952534e6d740cf3a8309c6465d853d9c253ad (commit)
commit bae29238768a138626db145600f424b80bb171ce
Author: Eric Koegel <eric.koegel at gmail.com>
Date: Sun Feb 26 16:54:15 2012 +0300
Added the root menu popup when there are no icons shown on the desktop.
src/xfce-desktop.c | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
index 2fc51d0..654f986 100644
--- a/src/xfce-desktop.c
+++ b/src/xfce-desktop.c
@@ -876,10 +876,16 @@ xfce_desktop_button_press_event(GtkWidget *w,
{
guint button = evt->button;
guint state = evt->state;
-
+ g_return_val_if_fail(XFCE_IS_DESKTOP(w), FALSE);
+
if(evt->type == GDK_BUTTON_PRESS) {
- if(button == 2 || (button == 1 && (state & GDK_SHIFT_MASK)
- && (state & GDK_CONTROL_MASK)))
+ if(XFCE_DESKTOP(w)->priv->icons_style == XFCE_DESKTOP_ICON_STYLE_NONE
+ && (button == 3 || (button == 1 && (state & GDK_SHIFT_MASK)))) {
+ xfce_desktop_popup_root_menu(XFCE_DESKTOP(w),
+ button,
+ evt->time);
+ } else if(button == 2 || (button == 1 && (state & GDK_SHIFT_MASK)
+ && (state & GDK_CONTROL_MASK)))
{
xfce_desktop_popup_secondary_root_menu(XFCE_DESKTOP(w),
button, evt->time);
More information about the Xfce4-commits
mailing list