mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-22 05:48:01 +01:00
- Really fixed problem with keyboard shortcuts executed an every screen for
multihead systems. - Fixed a wrong test in the selection code.
This commit is contained in:
@@ -313,7 +313,7 @@ handleNotifyEvent(XEvent *event)
|
||||
WM_ITERATE_ARRAY(selCallbacks, handler, iter) {
|
||||
|
||||
if (W_VIEW_DRAWABLE(handler->view) != event->xselection.requestor
|
||||
&& handler->selection == event->xselection.selection) {
|
||||
|| handler->selection != event->xselection.selection) {
|
||||
continue;
|
||||
}
|
||||
handler->flags.done_pending = 1;
|
||||
|
||||
@@ -416,31 +416,26 @@ raiseMenus(WMenu *menu)
|
||||
Bool
|
||||
wRootMenuPerformShortcut(XEvent *event)
|
||||
{
|
||||
WScreen *scr = wScreenForRootWindow(event->xkey.root);
|
||||
Shortcut *ptr;
|
||||
int modifiers;
|
||||
int done = 0;
|
||||
Window dummy;
|
||||
int foo;
|
||||
|
||||
if (wScreenCount>1 &&
|
||||
XQueryPointer(dpy, event->xkey.root, &dummy, &dummy, &foo, &foo, &foo,
|
||||
&foo, &foo)==False) {
|
||||
/* Pointer is not on this screen. */
|
||||
return True;
|
||||
}
|
||||
|
||||
/* ignore CapsLock */
|
||||
modifiers = event->xkey.state & ValidModMask;
|
||||
|
||||
for (ptr = shortcutList; ptr!=NULL; ptr = ptr->next) {
|
||||
if (ptr->keycode==0)
|
||||
continue;
|
||||
|
||||
if (ptr->keycode==event->xkey.keycode && (ptr->modifier==modifiers)) {
|
||||
(*ptr->entry->callback)(ptr->menu, ptr->entry);
|
||||
done = True;
|
||||
}
|
||||
if (ptr->keycode==0 || ptr->menu->menu->screen_ptr!=scr)
|
||||
continue;
|
||||
|
||||
if (ptr->keycode==event->xkey.keycode && ptr->modifier==modifiers) {
|
||||
(*ptr->entry->callback)(ptr->menu, ptr->entry);
|
||||
done = True;
|
||||
}
|
||||
}
|
||||
|
||||
return done;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user