[Xfce4-commits] [xfce/xfwm4] 01/01: screen: We always query the root window

noreply at xfce.org noreply at xfce.org
Sun May 12 17:35:58 CEST 2019


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

o   l   i   v   i   e   r       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfwm4.

commit f06d814d5b26e9206675522e91bef785662dd6ae
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Sun May 12 17:33:42 2019 +0200

    screen: We always query the root window
    
    We always query the root window for pointer location, there is no point
    in passing it around through the API really.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/compositor.c | 2 +-
 src/misc.c       | 5 +++--
 src/misc.h       | 1 -
 src/placement.c  | 2 +-
 src/screen.c     | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/compositor.c b/src/compositor.c
index 5877f22..85818f8 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -3332,7 +3332,7 @@ zoom_timeout_cb (gpointer data)
         return FALSE; /* stop calling this callback */
     }
 
-    getMouseXY (screen_info, screen_info->xroot, &x_root, &y_root);
+    getMouseXY (screen_info, &x_root, &y_root);
 
     if (screen_info->cursorLocation.x + screen_info->cursorOffsetX != x_root ||
         screen_info->cursorLocation.y + screen_info->cursorOffsetY != y_root)
diff --git a/src/misc.c b/src/misc.c
index 080b1f0..05db3db 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -45,7 +45,7 @@
 #include "misc.h"
 
 guint
-getMouseXY (ScreenInfo *screen_info, Window w, gint *x2, gint *y2)
+getMouseXY (ScreenInfo *screen_info, gint *x2, gint *y2)
 {
     Window w1, w2;
     guint mask;
@@ -54,8 +54,9 @@ getMouseXY (ScreenInfo *screen_info, Window w, gint *x2, gint *y2)
     TRACE ("window (0x%lx)", w);
 
     myDisplayErrorTrapPush (screen_info->display_info);
-    XQueryPointer (myScreenGetXDisplay (screen_info), w, &w1, &w2, &x1, &y1, x2, y2, &mask);
+    XQueryPointer (myScreenGetXDisplay (screen_info), screen_info->xroot, &w1, &w2, &x1, &y1, x2, y2, &mask);
     myDisplayErrorTrapPopIgnored (screen_info->display_info);
+
     return mask;
 }
 
diff --git a/src/misc.h b/src/misc.h
index 2924014..73b864d 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -61,7 +61,6 @@
 #endif
 
 guint                    getMouseXY                             (ScreenInfo *,
-                                                                 Window,
                                                                  gint *,
                                                                  gint *);
 GC                       createGC                               (ScreenInfo *,
diff --git a/src/placement.c b/src/placement.c
index 15975b3..3fb1294 100644
--- a/src/placement.c
+++ b/src/placement.c
@@ -800,7 +800,7 @@ clientInitPosition (Client * c)
     }
     else
     {
-        getMouseXY (screen_info, screen_info->xroot, &msx, &msy);
+        getMouseXY (screen_info, &msx, &msy);
         myScreenFindMonitorAtPoint (screen_info, msx, msy, &rect);
         place = TRUE;
     }
diff --git a/src/screen.c b/src/screen.c
index 5349e31..f18c0d7 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -606,7 +606,7 @@ myScreenGetModifierPressed (ScreenInfo *screen_info)
 {
     int rx, ry;
 
-    return (int) getMouseXY (screen_info, screen_info->xroot, &rx, &ry);
+    return (int) getMouseXY (screen_info, &rx, &ry);
 }
 
 Client *

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


More information about the Xfce4-commits mailing list