Skip to content

Apply "Accepts focus" window rule to WM_TAKE_FOCUS messages as well

Currently the window rule is not 100% effective because the "take focus" message is not guarded. So depending on the input model of the X11 window, kwin can still activate a window even if it has a window rule to force no focus.

workspace()->setShouldGetFocus() should be guarded too to help the focus stealing prevention logic.

Technically though, forcing XSetInputFocus() or WM_TAKE_FOCUS if the client doesn't advertise supporting them is finiky. But on the other hand, the window rules are an advanced feature, so its assumed that the user knows what they do.

Edited by Vlad Zahorodnii

Merge request reports

Loading