execute command where the mouse is, not where sel is

This commit is contained in:
Julien Danjou 2007-09-16 01:56:16 +02:00
parent 58abf74d43
commit 5e0cec002a
1 changed files with 3 additions and 8 deletions

View File

@ -327,14 +327,9 @@ handle_event_keypress(XEvent * e, awesome_config *awesomeconf)
for(i = 0; i < awesomeconf->nkeys; i++)
if(keysym == awesomeconf->keys[i].keysym
&& CLEANMASK(awesomeconf->keys[i].mod) == CLEANMASK(ev->state) && awesomeconf->keys[i].func)
{
if(sel)
awesomeconf->keys[i].func(e->xany.display, sel->screen, &dc, awesomeconf, awesomeconf->keys[i].arg);
else
for(screen = 0; screen < ScreenCount(e->xany.display); screen++)
if(XQueryPointer(e->xany.display, RootWindow(e->xany.display, screen), &dummy, &dummy, &y, &x, &d, &d, &m))
awesomeconf->keys[i].func(e->xany.display, screen, &dc, awesomeconf, awesomeconf->keys[i].arg);
}
}
void