[Xfce4-commits] [xfce/xfwm4] 07/09: Small code cleanup

noreply at xfce.org noreply at xfce.org
Fri Mar 27 22:39:13 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 691d95c7fba3f4aa928479a78e297fd81886a01f
Author: Olivier Fourdan <fourdan at xfce.org>
Date:   Fri Mar 27 21:52:55 2015 +0100

    Small code cleanup
    
    Remove dead code and reuse some other.
    
    Signed-off-by: Olivier Fourdan <fourdan at xfce.org>
---
 src/misc.c   |   13 -------------
 src/misc.h   |    2 --
 src/screen.c |    9 ++-------
 3 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/src/misc.c b/src/misc.c
index 27f7ee1..9551c6a 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -57,19 +57,6 @@ getMouseXY (ScreenInfo *screen_info, Window w, int *x2, int *y2)
     return mask;
 }
 
-Window
-getMouseWindow (ScreenInfo *screen_info, Window w)
-{
-    Window w1, w2;
-    unsigned int mask;
-    int x1, y1, x2, y2;
-
-    TRACE ("entering getMouseWindow");
-
-    XQueryPointer (myScreenGetXDisplay (screen_info), w, &w1, &w2, &x1, &y1, &x2, &y2, &mask);
-    return w2;
-}
-
 GC
 createGC (ScreenInfo *screen_info, char *col, int func, XFontStruct * font,
           int line_width, gboolean inc_sw)
diff --git a/src/misc.h b/src/misc.h
index 5b27439..c8ae79e 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -50,8 +50,6 @@ unsigned int             getMouseXY                             (ScreenInfo *,
                                                                  Window,
                                                                  int *,
                                                                  int *);
-Window                   getMouseWindow                         (ScreenInfo *,
-                                                                 Window);
 GC                       createGC                               (ScreenInfo *,
                                                                  char *,
                                                                  int,
diff --git a/src/screen.c b/src/screen.c
index 289915a..1af60fb 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -589,14 +589,9 @@ myScreenGetKeyPressed (ScreenInfo *screen_info, XKeyEvent * ev)
 int
 myScreenGetModifierPressed (ScreenInfo *screen_info)
 {
-    Window dr, window;
-    unsigned int modifiers;
-    int rx, ry, wx, wy;
+    int rx, ry;
 
-    XQueryPointer (myScreenGetXDisplay (screen_info), screen_info->xroot,
-                   &dr, &window, &rx, &ry, &wx, &wy, &modifiers);
-
-    return (int) modifiers;
+    return (int) getMouseXY (screen_info, screen_info->xroot, &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