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

            Bug ID: 488473
           Summary: [wayland] For Native Wayland Applications, Overview
                    Effect with Screen Edge Preserves Focus but Overview
                    Effect with Keyboard Shortcut Partially Does Not
    Classification: Plasma
           Product: kwin
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: effects-overview
          Assignee: kwin-bugs-n...@kde.org
          Reporter: eamonn...@protonmail.com
  Target Milestone: ---

SUMMARY
If you activate the Overview Effect using a Screen Edge, such as Top Left, the
currently focused window will keep its focused state. If the Overview Effect is
activated using a keyboard shortcut, such as Ctrl+W, all windows will partially
lose focus. This only applies to native Wayland applications.

This can be observed in different ways depending on the application. With a
standard KDE application like Dolphin running with Wayland, activating the
Overview Effect with a Screen Edge won't change the titlebar / windowing focus
colour shade. However if activating the Overview Effect with a keyboard
shortcut (like Ctrl+W), the window decoration area will keep its focused
colour, but the rest of the top part of the window will change to its unfocused
colour.

When the Overview Effect is cancelled (such as with Ctrl+W again or Escape)
then the window comes back into focus again and behaves as normal. 

Running Dolphin with `QT_QPA_PLATFORM=xcb dolphin` (and verifying that it is
using X11 with `xeyes`) and activating the Overview effect with either a Screen
Edge or a keyboard shortcut will preserve the window focus, at least visually.

I state that it "partially" loses focus because I am not sure internally if
focus is being given/lost, this is based on visuals. I also say partially
because Firefox, which dims the text in tabs when a window is unfocused, does
not dim the tab text in either Overview Effect case, but web pages will act as
though focus is lost - For example the Discord website version, which pauses
gifs when focus is lost, and gifs are paused when the Overview Effect is
activated with a keyboard shortcut but are NOT paused when the Overview Effect
is activated with a Screen Edge.

Other Wayland GTK applications behave randomly. GTK applications seem to retain
their titlebar focus colour, but window content (such as buttons with a tab
highlight) will lose focus when the Overview Effect is activated with a
keyboard shortcut but NOT when activated with a Screen Edge. Perhaps this is
why Firefox window content behaves unfocused, but the tab text retains its
focus, as other GTK applications retain the titlebar focus shade, and I believe
Firefox is GTK-based.

I am unsure if this behaviour is a regression, but it is a minor inconsistency
in behaviour.

STEPS TO REPRODUCE
Most Wayland Applications
1. Open a Wayland native application, such as KDE Dolphin and make sure it is
focused
2. Activate the Overview Effect with a Screen Edge
3. Dolphin retains its "focused" visuals
4. Close Overview Effect (i.e. with Escape)
5. Activate the Overview Effect again but this time with a keyboard shortcut
6. Dolphin's window decorations retain the focused shade, but the other parts
of the window (such as the toolbar just below the window decorations) gain
their unfocused shade.

X11 Qt Applications
1. Open an X11 Qt application, such as KDE Dolphin but with
`QT_QPA_PLATFORM=xcb dolphin` from the Terminal
    a. Optional: Verify that Dolphin is running under XWayland by using `xeyes`
and hovering over the Dolphin window; the eyes will follow the cursor when it
is over the X11 window, but not for the Wayland window.
2. Activate the Overview Effect with a Screen Edge
3. Dolphin retains its "focused" visuals
4. Close Overview Effect (i.e. with Escape)
5. Activate the Overview Effect again but this time with a keyboard shortcut
6. Dolphin still retains its "focused" visuals unlike when running with Wayland
native

 Wayland GTK Applications
1. Open a Wayland native GTK application, such as Firefox
2. Activate the Overview Effect with a Screen Edge
3. Application retains its "focused" visuals entirely (any highlighted sections
remain highlighted, titlebar does not change focus colour)
4. Close Overview Effect (i.e. with Escape)
5. Activate the Overview Effect again but this time with a keyboard shortcut
6. The window titlebar will still retain its "focused" visuals, but the window
content will behave as thought is unfocused
    a. On Firefox for example, highlights around text areas (such as on this
issue tracker) will disappear in this instance, but will remain highlighted
when the Overview Effect is activated with a Screen Edge

OBSERVED RESULT
Wayland window focus behaviour appears to differ, at least visually, depending
on whether the Overview Effect is activated using a Screen Edge or a keyboard
shortcut. This behaviour does not apply to X11 applications.

EXPECTED RESULT
I am not sure whether the window should be focused or unfocused. Perhaps
looking at the behaviour of other Desktop Environments / Operating Systems is a
good reference here (or previous Plasma behaviour, if this is a regression).

Alternatively, if X11 applications' focusing behaviour is the expected
behaviour, then this should be standard across Wayland applications as well.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.9.3 Linux Zen
KDE Plasma Version: 6.0.5
KDE Frameworks Version: 6.2.0
Qt Version: 6.7.1

ADDITIONAL INFORMATION
As far as I can tell, this doesn't really impact anything. This is not
something that is affecting me in any way, but I noticed it all the same. Maybe
it has implications for window behaviours/pausing (i.e. games) when focus is
lost? I have not been able to test any native Wayland games to see which might
have this sort of behaviour and if they are impacted.

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

Reply via email to