Skip to content

Drop Deleted

Vlad Zahorodnii requested to merge work/zzag/kill-deleted into master

Currently, the normal window lifecycle looks as follows: create Window, wait until it's shown, add it to Workspace, wait until it's closed, create a Deleted, copy properties from the original window to the deleted one, destroy the original window, wait until the last deleted window reference is dropped.

There are a couple of issues with this design: we can't nicely encapsulate X11 or Wayland specific implementation details if they need to be accessed for closed windows; manual copying of properties is cumbersome and error prone and we've had a dozen of cases where effects worked incorrectly because some properties had not been copied.

The goal of this patch is to drop Deleted and extend the lifetime of the original window, but with a special state set: Window::isDeleted().

The main danger is that somebody can try to do something with deleted windows that they should not do, but on the other hand, such code needs to be guarded with relevant checks too.

closes #88 (closed)

Merge request reports