mirror of
https://github.com/awesomeWM/awesome
synced 2024-11-17 07:47:41 +01:00
[event] Remove useless arguments to event_handle_mouse_button_press()
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
f824e383c9
commit
4966c46d60
1 changed files with 5 additions and 10 deletions
13
event.c
13
event.c
|
@ -51,19 +51,14 @@ extern AwesomeConf globalconf;
|
||||||
static void
|
static void
|
||||||
event_handle_mouse_button_press(int screen, unsigned int button,
|
event_handle_mouse_button_press(int screen, unsigned int button,
|
||||||
unsigned int state,
|
unsigned int state,
|
||||||
Button *buttons, char *arg)
|
Button *buttons)
|
||||||
{
|
{
|
||||||
Button *b;
|
Button *b;
|
||||||
|
|
||||||
for(b = buttons; b; b = b->next)
|
for(b = buttons; b; b = b->next)
|
||||||
if(button == b->button && CLEANMASK(state) == b->mod && b->func)
|
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
|
/** Handle XButtonPressed events
|
||||||
* \param connection connection to the X server
|
* \param connection connection to the X server
|
||||||
|
@ -138,7 +133,7 @@ event_handle_buttonpress(void *data __attribute__ ((unused)),
|
||||||
&& ev->detail == XCB_BUTTON_INDEX_1)
|
&& ev->detail == XCB_BUTTON_INDEX_1)
|
||||||
window_grabbuttons(c->win, c->phys_screen);
|
window_grabbuttons(c->win, c->phys_screen);
|
||||||
event_handle_mouse_button_press(c->screen, ev->detail, ev->state,
|
event_handle_mouse_button_press(c->screen, ev->detail, ev->state,
|
||||||
globalconf.buttons.titlebar, NULL);
|
globalconf.buttons.titlebar);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,7 +148,7 @@ event_handle_buttonpress(void *data __attribute__ ((unused)),
|
||||||
window_grabbuttons(c->win, c->phys_screen);
|
window_grabbuttons(c->win, c->phys_screen);
|
||||||
}
|
}
|
||||||
else
|
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
|
else
|
||||||
for(screen = 0; screen < xcb_setup_roots_length(xcb_get_setup(connection)); screen++)
|
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);
|
screen = screen_get_bycoord(globalconf.screens_info, screen, qr->root_x, qr->root_y);
|
||||||
event_handle_mouse_button_press(screen, ev->detail, ev->state,
|
event_handle_mouse_button_press(screen, ev->detail, ev->state,
|
||||||
globalconf.buttons.root, NULL);
|
globalconf.buttons.root);
|
||||||
|
|
||||||
p_delete(&qr);
|
p_delete(&qr);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue