Skip to content

Delegate screen edge reservation error handling to user

Window screen edge reservation relies on Window::showOnScreenEdge() getting called when the screen edge can't be reserved. That makes screen edge code not easy to follow.

This change makes ScreenEdges::reserve() indicate if a screen edge has been successfully reserved and delegate error handling to the user.

In most cases, if a screen edge has not been successfully hidden, you just need to avoid calling hideClient() and wait until the next moment when the window can be hidden again. Note that it differs from the current behavior but it's for a good reason. If the panel can't be hidden now, the panel has no idea how to handle it; only the compositor knows when it can be hidden again.

Edited by Vlad Zahorodnii

Merge request reports