x11: Ignore all grab notifications for focus handling

On X11 we get focus in and out events for normal input and when grabs
change. Kwin's concept of the active window should only follow the
normal focus changing.

Testing done:
Run Xfreerdp and move the pointer outside the window, the cursor
decoration should not change. It should still be the active window.
This commit is contained in:
David Edmundson 2024-07-30 10:47:50 +01:00
parent 2d23b30cee
commit 0081ede8f1

View file

@ -1202,7 +1202,7 @@ void X11Window::focusInEvent(xcb_focus_in_event_t *e)
if (e->event != window()) {
return; // only window gets focus
}
if (e->mode == XCB_NOTIFY_MODE_UNGRAB) {
if (e->mode == XCB_NOTIFY_MODE_GRAB || e->mode == XCB_NOTIFY_MODE_UNGRAB) {
return; // we don't care
}
if (e->detail == XCB_NOTIFY_DETAIL_POINTER) {
@ -1234,7 +1234,7 @@ void X11Window::focusOutEvent(xcb_focus_out_event_t *e)
if (e->event != window()) {
return; // only window gets focus
}
if (e->mode == XCB_NOTIFY_MODE_GRAB) {
if (e->mode == XCB_NOTIFY_MODE_GRAB || e->mode == XCB_NOTIFY_MODE_UNGRAB) {
return; // we don't care
}
if (isShade()) {