Bug 416511

Summary: Firefox using CSD flickers when maximizing/unmaximizing it.
Product: [Plasma] kwin Reporter: David Rubio <david.alejandro.rubio>
Component: generalAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED INTENTIONAL    
Severity: normal    
Priority: NOR    
Version: 5.17.90   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The bug in action.

Description David Rubio 2020-01-20 22:12:16 UTC
Created attachment 125269 [details]
The bug in action.

SUMMARY
Firefox, when having the "show title bar" option disabled, flickers when you press the maximize or unmaximize button.

STEPS TO REPRODUCE
1. Use firefox with CSD.
2. Maximize or unmaximize it.


OBSERVED RESULT
The firefox window flickers and "changes size" mid-resize, to then go back to the normal size.

EXPECTED RESULT
Smooth maximize/unmaximize animation.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.4.13-arch1-1
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66
Qt Version: 5.14

ADDITIONAL INFORMATION
Scale method is set to Smooth, rendering backend is OpenGL 3.1.
Comment 1 David Rubio 2020-01-20 22:12:59 UTC
As more info, this didn't happen (and doesn't happen) on 5.17.5 or earlier versions I'm able to test. I was able to reproduce this on KDE Neon Unstable.
Comment 2 Vlad Zahorodnii 2020-01-21 12:22:19 UTC
Unfortunately KWin needs to resize Firefox and any other client-side decorated client twice when it gets maximized or restored. We have to do that because we don't know the extents of the client-side drop-shadow. I'm afraid it is CANTFIX on X11.

There are several options available to you:

- switch to wayland
- disable maximize effect
- don't use client-side decorations

As for flickering, see bug 415839.