Honor struts when placing Wayland transients
ClosedPublic

Authored by graesslin on Dec 27 2018, 7:38 PM.

Details

Summary

So far transients were placed anywhere on the screen. This behavior was
inspired from X11 where context menus were able to overlap any other
window and use the complete screen area. On X11 context menus and
similar windows are override redirect and thus above all windows managed
by KWin.

On Wayland, though, context menus and similar and windows just like any
other window and thus follow stacking constraints like the parent
window. A context menu is stacked just above it's parent and is
(normally) below any panels. This resulted in problems that context menu
are stacked behind the panel with unreachable options.

This change changes the placement for transients to use the
PlacementArea instead of a screen geometry. Thus the transient does not
render behind the panel. Only in case of a fullscreen the struts are
ignored.

BUG: 389222
FIXED-IN: 5.15

Test Plan

New test case

Diff Detail

Repository
R108 KWin
Branch
transient-honor-struts
Lint
Lint OK
Unit
No Unit Test Coverage
Build Status
Buildable 6394
Build 6412: arc lint + arc unit
graesslin created this revision.Dec 27 2018, 7:38 PM
Restricted Application added a project: KWin. · View Herald TranscriptDec 27 2018, 7:38 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
graesslin requested review of this revision.Dec 27 2018, 7:38 PM
zzag accepted this revision.EditedDec 27 2018, 9:39 PM
zzag added a subscriber: zzag.

Off-topic: regarding the subject line, what's more preferable

Something Wayland related

or

[wayland] Some text

?

placement.cpp
501

const auto *

This revision is now accepted and ready to land.Dec 27 2018, 9:39 PM
In D17826#382852, @zzag wrote:

Off-topic: regarding the subject line, what's more preferable

Something Wayland related

or

[wayland] Some text

?

Depends. In this case the change is completely in core, so no prefix. I normally use the prefix if the change is contained in a subdirectory.

davidedmundson accepted this revision.Dec 28 2018, 11:16 AM
davidedmundson added a subscriber: davidedmundson.

That closer matches how Qt would position menus on X, so makes sense.

graesslin marked an inline comment as done.Dec 31 2018, 6:11 AM
This revision was automatically updated to reflect the committed changes.