Can't resize window under Kwin with the flickering fix
This is not an issue directly impacting this main repo but it does impact the X11 compositing patchset modifications I have made here.
While working on the X11 compositing patchset I added the WA_PaintOnScreen
attribute to the root window in order to fix resize flickering. Unfortunately, doing so introduces a new bug under Kwin, which prevents the user from resizing the window. It only happens with Kwin and could be reproduced under 3 different setups. Qt's documentation certainly includes big warnings about this attribute but it is the only fix I could come up with. Although Kwin's resizing issues are common this specific problem with Qt does not seem to have left any tracks on the internet:
- How can we diagnose it? Is it fixable?
- Is there any other way to fix resize flickering in the first place?
I tried overriding the paintEngine
method as mentionned in the documentation without noticing any impact. Changing other attributes and flags also does not seem to make a difference.
Update (associated reply):
I tried setting WA_PaintOnScreen
on the window of a small Qt application found in the example folder of the official repo and the window is not resizable as well, so this issue is not unique to VLC.
However, according to an old issue on Qt's bugtracker WA_PaintOnScreen
was not designed to work on windows. Also, it seems the resize signal randomly gets to the root window depending on how fast we resize it (but the reason why it stops almost instantaneously remains a mystery).
Another possible way to fix the flickering issue is to set the WA_PaintOnScreen
attribute on the window's central widget instead of the window itself. This makes it possible to resize the window with Kwin, but only fixes the flickering happening when making the window bigger. Otherwise the whole UI keeps flickering, even on other desktop environments.
Update
Using a fixed-size compositing backtexture does not help with this issue.