[Xfce4-commits] [xfce/xfwm4] 03/05: Use standard modifier to adjust opacity

noreply at xfce.org noreply at xfce.org
Tue Jan 6 22:08:35 CET 2015


This is an automated email from the git hooks/post-receive script.

olivier pushed a commit to branch master
in repository xfce/xfwm4.

commit 08fff477418549609955127365fa338cf0055a6c
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Tue Jan 6 21:28:22 2015 +0100

    Use standard modifier to adjust opacity
    
    Instead of hardcoding Alt.
    Incidently, this is actually the same shortcut as zoom.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/events.c |   22 ++++++++++++++--------
 1 file changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/events.c b/src/events.c
index 643ce96..7199688 100644
--- a/src/events.c
+++ b/src/events.c
@@ -801,11 +801,14 @@ titleButton (Client * c, guint state, XButtonEvent * ev)
     else if (ev->button == Button4)
     {
         /* Mouse wheel scroll up */
-        if (state == AltMask)
+#ifdef HAVE_COMPOSITOR
+        if ((state) && (state == screen_info->params->easy_click) && (screen_info->compositor_active))
         {
             clientIncOpacity(c);
         }
-        else if (!FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
+        else
+#endif /* HAVE_COMPOSITOR */
+        if (!FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
         {
             if (screen_info->params->mousewheel_rollup)
             {
@@ -816,11 +819,14 @@ titleButton (Client * c, guint state, XButtonEvent * ev)
     else if (ev->button == Button5)
     {
         /* Mouse wheel scroll down */
-        if (state == AltMask)
+#ifdef HAVE_COMPOSITOR
+        if ((state) && (state == screen_info->params->easy_click) && (screen_info->compositor_active))
         {
             clientDecOpacity(c);
         }
-        else if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
+        else
+#endif /* HAVE_COMPOSITOR */
+        if (FLAG_TEST (c->flags, CLIENT_FLAG_SHADED))
         {
             if (screen_info->params->mousewheel_rollup)
             {
@@ -904,13 +910,13 @@ handleButtonPress (DisplayInfo *display_info, XButtonEvent * ev)
             edgeButton (c, part, ev);
         }
 #ifdef HAVE_COMPOSITOR
-        else if ((ev->button == Button4) && (state) && (state == screen_info->params->easy_click)
-                  && (screen_info->compositor_active))
+        else if ((ev->button == Button4) && (state) && (state == screen_info->params->easy_click) &&
+                 (screen_info->compositor_active))
         {
             compositorZoomIn(screen_info, ev);
         }
-        else if ((ev->button == Button5) && (state) && (state == screen_info->params->easy_click)
-                  && (screen_info->compositor_active))
+        else if ((ev->button == Button5) && (state) && (state == screen_info->params->easy_click) &&
+                 (screen_info->compositor_active))
         {
             compositorZoomOut(screen_info, ev);
         }

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


More information about the Xfce4-commits mailing list