[PATCH libxcwm 10/15] Remove unused x, y parameters to xcwm_input_mouse_button_event()

Jon TURNEY jon.turney at dronecode.org.uk
Mon Nov 5 14:50:11 PST 2012


Signed-off-by: Jon TURNEY <jon.turney at dronecode.org.uk>
---
 include/xcwm/input.h      |   12 +++---------
 src/libxcwm/input.c       |    5 ++---
 src/xtoq/XtoqController.m |    4 ----
 3 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/include/xcwm/input.h b/include/xcwm/input.h
index 8f9d114..4fe4a13 100644
--- a/include/xcwm/input.h
+++ b/include/xcwm/input.h
@@ -40,23 +40,17 @@ void
 xcwm_input_key_event(xcwm_context_t *context, uint8_t code, int state);
 
 /**
- * Uses the XTEST protocol to send input events to the X Server (The X Server
- * is usually in the position of sending input events to a client). The client
- * will often choose to send coordinates through mouse motion and set the params
- * x & y to 0 here.
+ * Send mouse button event to the X Server.
  * @param window The window the event occured in.
- * @param x - x coordinate
- * @param y - y coordinate
  * @param button The mouse button pressed.
  * @param state 1 if the mouse button is pressed down, 0 if released.
  */
 void
 xcwm_input_mouse_button_event(xcwm_window_t *window,
-                              long x, long y, int button,
-                              int state);
+                              int button, int state);
 
 /**
- * Handler for mouse motion event.
+ * Send mouse motion event to the X Server.
  * @param context xcwm_context_t
  * @param x - x coordinate
  * @param y - y coordinate
diff --git a/src/libxcwm/input.c b/src/libxcwm/input.c
index 2fe00c8..3efc35a 100644
--- a/src/libxcwm/input.c
+++ b/src/libxcwm/input.c
@@ -50,7 +50,6 @@ xcwm_input_key_event(xcwm_context_t *context, uint8_t code, int state)
 
 void
 xcwm_input_mouse_button_event(xcwm_window_t *window,
-                              long x, long y,
                               int button, int state)
 {
     int button_state;
@@ -67,8 +66,8 @@ xcwm_input_mouse_button_event(xcwm_window_t *window,
                         XCB_CURRENT_TIME,
                         window->window_id, 0, 0, 0);
     xcb_flush(window->context->conn);
-    printf("Injected mouse event - (%ld,%ld), button %d, state: %d\n",
-           x, y, button, state);
+    printf("Injected mouse event - button %d, state: %d\n",
+           button, state);
 }
 
 void
diff --git a/src/xtoq/XtoqController.m b/src/xtoq/XtoqController.m
index eebc09d..c6bc564 100644
--- a/src/xtoq/XtoqController.m
+++ b/src/xtoq/XtoqController.m
@@ -246,8 +246,6 @@
 
     dispatch_async(xcwmDispatchQueue,
                    ^{ xcwm_input_mouse_button_event (window,
-                                                     0,
-                                                     0,
                                                      buttonInt,
                                                      1);
                       ;
@@ -273,8 +271,6 @@
 
     dispatch_async(xcwmDispatchQueue,
                    ^{ xcwm_input_mouse_button_event (window,
-                                                     0,
-                                                     0,
                                                      buttonInt,
                                                      0);
                    });
-- 
1.7.9



More information about the xorg-devel mailing list