Do not pass events with no window to the findClient - windowEvent cascade
If the eventWindow is none the check for InputIdMatchPredicate will find a matching Client and pass the even through the windowEvent filter which returns true for all not handled events and thus filters out all events processed later on in KWin. This explains why some events were eaten...
This commit is contained in:
parent
c1d0a32b64
commit
7ed07e45c7
1 changed files with 23 additions and 21 deletions
44
events.cpp
44
events.cpp
|
@ -229,27 +229,29 @@ bool Workspace::workspaceEvent(xcb_generic_event_t *e)
|
|||
};
|
||||
|
||||
const xcb_window_t eventWindow = findEventWindow(e);
|
||||
if (Client* c = findClient(WindowMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Client* c = findClient(WrapperIdMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Client* c = findClient(FrameIdMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Client *c = findClient(InputIdMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Unmanaged* c = findUnmanaged(WindowMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else {
|
||||
// We want to pass root window property events to effects
|
||||
if (eventType == XCB_PROPERTY_NOTIFY) {
|
||||
auto *event = reinterpret_cast<xcb_property_notify_event_t*>(e);
|
||||
if (event->window == rootWindow()) {
|
||||
emit propertyNotify(event->atom);
|
||||
if (eventWindow != XCB_WINDOW_NONE) {
|
||||
if (Client* c = findClient(WindowMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Client* c = findClient(WrapperIdMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Client* c = findClient(FrameIdMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Client *c = findClient(InputIdMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else if (Unmanaged* c = findUnmanaged(WindowMatchPredicate(eventWindow))) {
|
||||
if (c->windowEvent(e))
|
||||
return true;
|
||||
} else {
|
||||
// We want to pass root window property events to effects
|
||||
if (eventType == XCB_PROPERTY_NOTIFY) {
|
||||
auto *event = reinterpret_cast<xcb_property_notify_event_t*>(e);
|
||||
if (event->window == rootWindow()) {
|
||||
emit propertyNotify(event->atom);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue