1
0
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:
dan
2001-12-30 01:50:46 +00:00
parent d35dd84ae5
commit 7eb705472f
2 changed files with 10 additions and 15 deletions

View File

@@ -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;

View File

@@ -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)
if (ptr->keycode==0 || ptr->menu->menu->screen_ptr!=scr)
continue;
if (ptr->keycode==event->xkey.keycode && (ptr->modifier==modifiers)) {
if (ptr->keycode==event->xkey.keycode && ptr->modifier==modifiers) {
(*ptr->entry->callback)(ptr->menu, ptr->entry);
done = True;
}
}
return done;
}