https://bugs.kde.org/show_bug.cgi?id=439405

Vlad Zahorodnii <vlad.zahorod...@kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|https://invent.kde.org/plas |https://invent.kde.org/plas
                   |ma/kwin/commit/e6c77a1ddc02 |ma/kwin/commit/fba3f1e7311b
                   |26e5893cc7403a5f6344032e07c |cd1bb7dc0113bfb16a82a656b8c
                   |2                           |7

--- Comment #19 from Vlad Zahorodnii <vlad.zahorod...@kde.org> ---
Git commit fba3f1e7311bcd1bb7dc0113bfb16a82a656b8c7 by Vlad Zahorodnii.
Committed on 05/10/2021 at 14:54.
Pushed by vladz into branch 'Plasma/5.23'.

Clear should_get_focus in Workspace::focusToNull()

On X11, there are four input models. With some input models, it's okay
if the window manager calls XSetInputFocus(), with others, the wm has to
ask the client to make a XSetInputFocus() request.

If kwin wants a client to take input focus, kwin will add the client
to the should_get_focus list, which contains all the windows that
are about to get input focus. Clients are popped from the list upon
receiving FOCUS_IN events.

A client will be added to the should_get_focus list even if kwin thinks
that the client already has input focus because communication between
the wm and xorg is async, anything can happen with input focus in meanwhile.

On the other hand, the wm may sometimes focus the null window if no
window should contain the input focus. The issue is that the
should_get_focus list is not cleaned up in that case, which can lead to
Workspace::mostRecentlyActivatedClient() returning wrong client and
possibly other async related issues.

We don't have such madness on Wayland as the compositor is in charge of
handling input focus.

This change makes Workspace::focusToNull() clear the should_get_focus,
which is reasonable. We need to deactivate "in-flight" focus requests.

This also fixes the bug where fullscreen Wayland windows don't go above
docks and panels due to Workspace::mostRecentlyActivatedClient() returning
bad client.
Related: bug 395919


(cherry picked from commit e6c77a1ddc0226e5893cc7403a5f6344032e07c2)

M  +1    -0    src/workspace.cpp

https://invent.kde.org/plasma/kwin/commit/fba3f1e7311bcd1bb7dc0113bfb16a82a656b8c7

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to