[wayland] Don't update margins in ShellClient::finishInit
ClosedPublic

Authored by zzag on Sep 5 2019, 4:42 PM.

Details

Summary

It doesn't make sense to update window margins in finishInit because no
buffer is attached yet at that moment.

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
zzag created this revision.Sep 5 2019, 4:42 PM
Restricted Application added a project: KWin. · View Herald TranscriptSep 5 2019, 4:42 PM
Restricted Application added a subscriber: kwin. · View Herald Transcript
zzag requested review of this revision.Sep 5 2019, 4:42 PM

Yes, but for popups we know the initial size before we have a buffer and window geometry within that is still valid.

zzag added a comment.Sep 6 2019, 7:52 AM

We have to clamp window geometry to bounding rectangle of the surface, including subsurfaces. Initial size in xdg_positioner corresponds to window geometry.

zzag added a comment.Sep 6 2019, 7:52 AM

We should not call updateWindowMargins() in ShellClient::finishInit().

zzag added a comment.Sep 6 2019, 8:00 AM

However we need to react to window geometry changes. I want to address this in 5.18 :-)

zzag added a comment.Sep 6 2019, 8:01 AM

Currently, we call updateWindowMargins() from ShellClient::addDamage() which is not quite accurate.

davidedmundson accepted this revision.Sep 6 2019, 9:04 AM

However we need to react to window geometry changes. I want to address this in 5.18 :-)

Ack,that's a known TODO.
It's in damage simply because it's analogous to the surface commit.

Initial size in xdg_positioner corresponds to window geometry.

Fair point.

This revision is now accepted and ready to land.Sep 6 2019, 9:04 AM
This revision was automatically updated to reflect the committed changes.