[Xfce4-commits] [xfce/xfwm4] 04/05: Handle zoom option in event handler

noreply at xfce.org noreply at xfce.org
Tue Jan 6 22:08:36 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 7e77f7e9f2116e94347b0dd4322e4635787b08da
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Tue Jan 6 21:41:38 2015 +0100

    Handle zoom option in event handler
    
    So that if zooming is disabled, opacity can work...
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c |    7 -------
 src/events.c     |    8 ++++----
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index e013187..d7ed9a4 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3047,10 +3047,6 @@ void
 compositorZoomIn (ScreenInfo *screen_info, XButtonEvent *ev)
 {
 #ifdef HAVE_COMPOSITOR
-    /* don't do anything if the user disabled the zoom feature */
-    if (!screen_info->params->zoom_desktop)
-        return;
-
     screen_info->transform.matrix[0][0] -= 4096;
     screen_info->transform.matrix[1][1] -= 4096;
 
@@ -3083,9 +3079,6 @@ compositorZoomOut (ScreenInfo *screen_info, XButtonEvent *ev)
 {
 #ifdef HAVE_COMPOSITOR
     /* don't do anything if the user disabled the zoom feature */
-    if (!screen_info->params->zoom_desktop)
-        return;
-
     if(screen_info->zoomed)
     {
         screen_info->transform.matrix[0][0] += 4096;
diff --git a/src/events.c b/src/events.c
index 7199688..4c38d08 100644
--- a/src/events.c
+++ b/src/events.c
@@ -910,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) && (screen_info->params->zoom_desktop) && (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) && (screen_info->params->zoom_desktop) && (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