Bug 395919 - XdgShell fullscreen doesn't cover panels
Summary: XdgShell fullscreen doesn't cover panels
Status: RESOLVED FIXED
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (other bugs)
Version First Reported In: 5.13.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-06-27 08:45 UTC by tromzy
Modified: 2021-10-05 14:54 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tromzy 2018-06-27 08:45:13 UTC
On Wayland, if I play a Youtube video fullscreen (HTML5 player, did not try with Flash), it is not really fullscreen : on Falkon it shows the Plasma panel and Falkon title bar ; on Firefox (XWayland), it shows the plasma panel but no title bar. Plasma 5.13.2, KDE Frameworks 5.47, Intel modesetting driver, Archlinux.
Comment 1 tromzy 2018-06-27 08:54:39 UTC
Also : the plasma panel is Latte Dock.
Comment 2 Alexander Mentyu 2018-06-30 07:02:32 UTC
Can reproduce appearance of panel and titlebar in fullscreen in Falkon, in Firefox and Chromium fullscreen panel and titlebar aren't shown

firefox-61.0-1
chromium-67.0.3396.87-2
falkon-git-3.0.1
Plasma: 5.13.1
Apps: 18.04.2
Frameworks: 5.47.0
Qt: 5.11.1
Kernel: 4.18.0-1-MANJARO
OS: Netrunner Rolling
Video: Intel 4400
Driver: xf86-video-intel 1:2.99.917+831+ge7bfc906-1
Mesa 3D: 18.1.2
Screen: 1600x900
Xorg: 1.20
Wayland: 1.15.0-1
Wayland Protocols: 1.14-1
Comment 3 Franz Trischberger 2018-07-18 08:53:13 UTC
Could be a kde issue:
* Gwenview fullscreen shows plasma panel and window title bar.
* Okular "Presentation" (which goes into fullscreen mode) shows plasma panel but somehow gets rid of the window title bar.
* firefox works fine
* RawTherapee works fine

Interestingly Cantata, which is a pure Qt5-application, does nothing when triggering Fullscreen (besides showing a clickable label with the message "leave fullscreen"). So it could be that also Qt is invloved.

This is with all the latest and greatest (ATM) stable releases available:
* plasma-5.13.3
* frameworks-5.48.0
* Qt-5.11.1
Comment 4 Patrick Silva 2018-07-26 01:12:06 UTC
probably because this Qt bug
https://bugreports.qt.io/browse/QTBUG-63748
Comment 5 David Edmundson 2020-02-10 09:15:18 UTC
I read through WAYLAND_DEBUG output and Qt is doing everything correctly.

The window is resized to the full screen, it just doesn't have the layer set correctly.
Comment 6 Vlad Zahorodnii 2021-10-05 14:53:52 UTC
Git commit e6c77a1ddc0226e5893cc7403a5f6344032e07c2 by Vlad Zahorodnii.
Committed on 05/10/2021 at 14:53.
Pushed by vladz into branch 'master'.

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 439405

M  +1    -0    src/workspace.cpp

https://invent.kde.org/plasma/kwin/commit/e6c77a1ddc0226e5893cc7403a5f6344032e07c2
Comment 7 Vlad Zahorodnii 2021-10-05 14:54:13 UTC
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 439405


(cherry picked from commit e6c77a1ddc0226e5893cc7403a5f6344032e07c2)

M  +1    -0    src/workspace.cpp

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