Skip to content

x11window: avoid changing 'WM_STATE' of window when reinitialize compositor

zeming huang requested to merge huangzeming/kwin:master into master

If configuration 'HiddenPreview' is 'HiddenPreviewAlways', 'WM_STATE' of window might be changed when reinitialize compositor.

When stopping compositor, its state will be set to 'Stopping' before calling 'window->finishCompositing' and 'updateVisbility'. Therefore, 'Compositor::compositing' returns false in function 'updateVisibility' and it's impossible to enter 'internalKeep', which is expected though. But when starting compositor, 'compositing' is true and 'internalKeep' will be called.

In function 'internalKeep', 'WM_STATE' might be changed due to window's last 'MappingState'. As mentioned above, 'MappingState' could be 'Unmapped' when stopping compositor because it may call 'internalHide' when 'updateVisibility'. So when starting compositor, window's 'WM_STATE' will be changed.

Merge request reports