Improve appearance of the logout dialog on wayland
ClosedPublic

Authored by fvogt on Feb 10 2018, 2:25 PM.

Details

Summary

The logout dialog has a taskbar entry and appears like a regular window on
wayland. This is because Qt does not support fullscreen windows with xdg_shell
as of 5.9.4. wl-shell works, so force it for the time being.

Test Plan

Ran ksmserver-logout-greeter on X11 and wayland, looks identical now.

Diff Detail

Repository
R120 Plasma Workspace
Branch
Plasma/5.12
Lint
No Linters Available
Unit
No Unit Test Coverage
fvogt created this revision.Feb 10 2018, 2:25 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFeb 10 2018, 2:25 PM
fvogt requested review of this revision.Feb 10 2018, 2:25 PM
bshah requested changes to this revision.Feb 10 2018, 2:26 PM
bshah added a subscriber: bshah.
bshah added inline comments.
ksmserver/shutdowndlg.cpp
256

That's wrong.. it is not notification.

This revision now requires changes to proceed.Feb 10 2018, 2:26 PM
fvogt updated this revision to Diff 26874.Feb 10 2018, 3:09 PM

Don't use the setRole(Notification) hack. That causes it to be drawn below fullscreen windows.
OSD might work, but those don't normally accept input.
So for now just use setSkipTaskbar(true);

fvogt retitled this revision from Fix appearance of the logout dialog on wayland to Improve appearance of the logout dialog on wayland.Feb 10 2018, 3:11 PM
fvogt edited the summary of this revision. (Show Details)
fvogt edited the test plan for this revision. (Show Details)
bshah accepted this revision as: bshah.Feb 10 2018, 3:11 PM

+1 from me, if you want wait for review from others.

fvogt added a comment.Feb 10 2018, 3:21 PM

OSD might work, but those don't normally accept input.

"normally" = "it shouldn't, but when testing it it does accept input just fine"
@graesslin is it a bug that setRole(OnScreenDisplay); makes it work exactly like on X11 on wayland?
i.e. is it intentional that OSDs are interactive?

graesslin requested changes to this revision.Feb 10 2018, 4:24 PM

I'm against this change. The window is set to fullscreen, but that doesn't work due to a Qt bug. Let's not work around Qt bugs: https://bugreports.qt.io/browse/QTBUG-63748

This revision now requires changes to proceed.Feb 10 2018, 4:24 PM
fvogt added a comment.Feb 10 2018, 5:03 PM

I'm against this change. The window is set to fullscreen, but that doesn't work due to a Qt bug.

Is the referenced patch enough to make it work? AFAICT it would also need a change in kwaylandintegration for the decoration.
The calls added here don't conflict with other parts, they simply set what should be done by Qt already.
Doing this in addition isn't even a hack as it has no downsides.

Let's not work around Qt bugs: https://bugreports.qt.io/browse/QTBUG-63748

Why not? Workarounds for Qt bugs are in many places already.

I'm against this change. The window is set to fullscreen, but that doesn't work due to a Qt bug.

Is the referenced patch enough to make it work? AFAICT it would also need a change in kwaylandintegration for the decoration.

A fullscreen window does not have decorations. Yes, the referenced patch is enough.

The calls added here don't conflict with other parts, they simply set what should be done by Qt already.
Doing this in addition isn't even a hack as it has no downsides.

I disagree. Setting a fullscreen window to frameless is confusing and wrong for anybody who is going to read the code later on.

Let's not work around Qt bugs: https://bugreports.qt.io/browse/QTBUG-63748

Why not? Workarounds for Qt bugs are in many places already.

Yes, but it is bad practice and in this case it's not even fixing all the problems. The window is still not fullscreen, which is a problem as soon as you have other fullscreen windows.

If you want to workaround let's just force to wl_shell instead of xdg_shell which doesn't expose the problem. Just set env variable QT_WAYLAND_SHELL_INTEGRATION to wl-shell

fvogt updated this revision to Diff 26891.Feb 10 2018, 9:01 PM

Use a different workaround: wl-shell instead of xdg-shell.

fvogt edited the summary of this revision. (Show Details)Feb 10 2018, 9:03 PM
fvogt edited the test plan for this revision. (Show Details)
graesslin accepted this revision.Feb 11 2018, 7:49 AM
This revision is now accepted and ready to land.Feb 11 2018, 7:49 AM
This revision was automatically updated to reflect the committed changes.