Simplify Window::updateLayer()

Open Vlad Zahorodnii requested to merge work/zzag/window-update-layer-simplify into master

Window::updateLayer() invalidates the layer but not sets it to the new value. The new value will be set when Workspace::updateStackingOrder() calls Window::layer().

This change simplifies the code by making updateLayer() write the new value immediately.

Technically, it's slightly different. For example, if Window::layer() is called before updateLayer(), it will return a valid value. But it's an edge case, which I don't think we need to worry about because the workspace will call updateLayer() before adding the window.

Merge request reports