Set the restore geometry after placing a ShellClient for the first time
ClosedPublic

Authored by graesslin on Aug 30 2016, 11:20 AM.

Details

Summary

The restore geometry gets initially set to 0/0xsize before the placement
is done. When going into updateClientArea and then afterwards into
AbstractClient::checkWorkspacePosition the geometry restory is used for
calculating the new position. This results in windows getting moved to
0/0 when e.g. plugging in a new screen or a panel changes, etc.

This change ensures that the restore geometry is set correctly after the
first placement.

BUG: 366696

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.
graesslin updated this revision to Diff 6367.Aug 30 2016, 11:20 AM
graesslin retitled this revision from to Set the restore geometry after placing a ShellClient for the first time.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptAug 30 2016, 11:20 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript

Fixwise good, APIwise, maybe add AbstractClient::placeIn(QRect &area) { Placement::self()->place(this, area); setGeometryRestore(geometry()); } to
a) prevent uninformed messing around with the restore geomery
b) guarantee sync behavior (when placing occurs)

?

Fixwise good, APIwise, maybe add AbstractClient::placeIn(QRect &area) { Placement::self()->place(this, area); setGeometryRestore(geometry()); } to
a) prevent uninformed messing around with the restore geomery
b) guarantee sync behavior (when placing occurs)

?

yep makes sense.

graesslin updated this revision to Diff 6383.Aug 31 2016, 12:05 PM

Add a ShellClient::placeIn(QRect&) to provide the logic

luebking accepted this revision.Aug 31 2016, 12:37 PM
luebking added a reviewer: luebking.
This revision is now accepted and ready to land.Aug 31 2016, 12:37 PM
This revision was automatically updated to reflect the committed changes.