~noskcaj/ubuntu/trusty/xfdesktop4/4.11.2-1

« back to all changes in this revision

Viewing changes to debian/patches/0027-Added-the-root-menu-popup-when-there-are-no-icons-sh.patch

  • Committer: Package Import Robot
  • Author(s): Lionel Le Folgoc
  • Date: 2012-05-18 22:18:02 UTC
  • mfrom: (3.1.7 experimental)
  • Revision ID: package-import@ubuntu.com-20120518221802-htmj6h4apaij25l2
Tags: 4.10.0-1ubuntu1
* Merge from Debian experimental, remaining Ubuntu change:
  - debian/patches/xubuntu_improve-nautilus-interactions.patch: added,
    should prevent nautilus from taking over the desktop if xfdesktop is
    running (and vice-versa).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From bae29238768a138626db145600f424b80bb171ce Mon Sep 17 00:00:00 2001
2
 
From: Eric Koegel <eric.koegel@gmail.com>
3
 
Date: Sun, 26 Feb 2012 16:54:15 +0300
4
 
Subject: Added the root menu popup when there are no icons shown on the
5
 
 desktop.
6
 
 
7
 
---
8
 
 src/xfce-desktop.c |   12 +++++++++---
9
 
 1 file changed, 9 insertions(+), 3 deletions(-)
10
 
 
11
 
 Slightly edited line numbers for the patch to apply cleanly in Xubuntu.
12
 
 
13
 
diff --git a/src/xfce-desktop.c b/src/xfce-desktop.c
14
 
index 2fc51d0..654f986 100644
15
 
--- a/src/xfce-desktop.c
16
 
+++ b/src/xfce-desktop.c
17
 
@@ -871,10 +871,16 @@ xfce_desktop_button_press_event(GtkWidget *w,
18
 
 {
19
 
     guint button = evt->button;
20
 
     guint state = evt->state;
21
 
-    
22
 
+    g_return_val_if_fail(XFCE_IS_DESKTOP(w), FALSE);
23
 
+
24
 
     if(evt->type == GDK_BUTTON_PRESS) {
25
 
-        if(button == 2 || (button == 1 && (state & GDK_SHIFT_MASK)
26
 
-                           && (state & GDK_CONTROL_MASK)))
27
 
+        if(XFCE_DESKTOP(w)->priv->icons_style == XFCE_DESKTOP_ICON_STYLE_NONE
28
 
+           && (button == 3 || (button == 1 && (state & GDK_SHIFT_MASK)))) {
29
 
+            xfce_desktop_popup_root_menu(XFCE_DESKTOP(w),
30
 
+                                         button,
31
 
+                                         evt->time);
32
 
+        } else if(button == 2 || (button == 1 && (state & GDK_SHIFT_MASK)
33
 
+                                  && (state & GDK_CONTROL_MASK)))
34
 
         {
35
 
             xfce_desktop_popup_secondary_root_menu(XFCE_DESKTOP(w),
36
 
                                                    button, evt->time);
37
 
1.7.9.5
38