From 4966c46d60800bab9c07e6880195931206c5ac62 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Sun, 11 May 2008 16:56:18 +0200 Subject: [PATCH] [event] Remove useless arguments to event_handle_mouse_button_press() Signed-off-by: Julien Danjou --- event.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/event.c b/event.c index 04405b68f..4b7d4c60f 100644 --- a/event.c +++ b/event.c @@ -51,18 +51,13 @@ extern AwesomeConf globalconf; static void event_handle_mouse_button_press(int screen, unsigned int button, unsigned int state, - Button *buttons, char *arg) + Button *buttons) { Button *b; for(b = buttons; b; b = b->next) if(button == b->button && CLEANMASK(state) == b->mod && b->func) - { - if(arg) - b->func(screen, arg); - else - b->func(screen, b->arg); - } + b->func(screen, b->arg); } /** Handle XButtonPressed events @@ -138,7 +133,7 @@ event_handle_buttonpress(void *data __attribute__ ((unused)), && ev->detail == XCB_BUTTON_INDEX_1) window_grabbuttons(c->win, c->phys_screen); event_handle_mouse_button_press(c->screen, ev->detail, ev->state, - globalconf.buttons.titlebar, NULL); + globalconf.buttons.titlebar); return 0; } @@ -153,7 +148,7 @@ event_handle_buttonpress(void *data __attribute__ ((unused)), window_grabbuttons(c->win, c->phys_screen); } else - event_handle_mouse_button_press(c->screen, ev->detail, ev->state, globalconf.buttons.client, NULL); + event_handle_mouse_button_press(c->screen, ev->detail, ev->state, globalconf.buttons.client); } else for(screen = 0; screen < xcb_setup_roots_length(xcb_get_setup(connection)); screen++) @@ -162,7 +157,7 @@ event_handle_buttonpress(void *data __attribute__ ((unused)), { screen = screen_get_bycoord(globalconf.screens_info, screen, qr->root_x, qr->root_y); event_handle_mouse_button_press(screen, ev->detail, ev->state, - globalconf.buttons.root, NULL); + globalconf.buttons.root); p_delete(&qr); return 0;