[wayland] Squash reconfigure methods

Authored by davidedmundson on Feb 26 2019, 10:34 AM.



We can handle the case of a null size inside
ShellClient::requestGeometry and that makes that method more robust.

With that we don't need to handle separate code paths in
the handler of RequestGeometryBlocker.

It's not an exact identical code path, but everything still works out.

If the geometry is unchanged, we'll save the positionAfterResize but
when we apply it doSetGeometry will no-op.

There's also an assumption that toggling maximised will always send a
valid size, but that's true for the current state.

Test Plan

Ran unit tests

Diff Detail

R108 KWin
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
Restricted Application added a project: KWin. · View Herald TranscriptFeb 26 2019, 10:34 AM
Restricted Application added a subscriber: kwin. · View Herald Transcript
davidedmundson requested review of this revision.Feb 26 2019, 10:34 AM

There's a tiny bit I don't like, so to share my future (long term) plans:

I want to make this

requestGeometry(QSize size, std::optional<QPoint> topLeft)

This would fit top levels better, but it introduces an issue for popups which must always know their position ahead of configuring.

So my grand plan is to kill ShellSurface and then make XdgTopLevelClient and XdgPopupClient both subclasses of the now abstract ShellClient.

zzag accepted this revision.Feb 26 2019, 11:53 AM
This revision is now accepted and ready to land.Feb 26 2019, 11:53 AM
This revision was automatically updated to reflect the committed changes.