Skip to content

Make Workspace::desktopResized() reassign outputs of uninitialized windows

If an output is deleted, the Workspace::desktopResized() is going to re-assign windows to the new outputs. It is done so so the workspace re-arrangement procedure is deterministic and has concrete order.

However, with the current Window lifecycle management, it's possible to encounter the follwing case:

  • xdg_toplevel gets created on output A
  • xdg_toplevel initial state is committed
  • output A is removed
  • a wl_buffer is attached to the xdg_toplevel, which results in a geometry change and an output change
  • Window::setMoveResizeOutput() is called, but the previous output is a dangling pointer

CCBUG: 489632

Merge request reports