https://bugs.kde.org/show_bug.cgi?id=445457
Bug ID: 445457 Summary: Showing a window before disabling resizing (GTK4 dialogs) results in incorrect title bar buttons Product: kwin Version: 5.23.3 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: decorations Assignee: kwin-bugs-n...@kde.org Reporter: nyanpas...@tuta.io Target Milestone: --- Created attachment 143527 --> https://bugs.kde.org/attachment.cgi?id=143527&action=edit The bug in gtk4-demo SUMMARY In X11 apps which first map a window, *then* call XSetWMNormalHints or send WM_NORMAL_HINTS to disable resizing (which hides kwin_x11's Maximize button), KWin fails to recompute the title bar layout and right-align the buttons. STEPS TO REPRODUCE 1. Run gtk4-demo. 2. Scroll down to Dialogs and click Run. OBSERVED RESULT The title bar contains a minimize button, close button, and a blank space to the right (where the close button would be, if a maximize button was present). EXPECTED RESULT The title bar is properly right-aligned. I don't know if GTK4 is wrong for mapping a window before disabling resize, or if KWin is wrong for rendering the title bar incorrectly when resizability is toggled after a window is mapped, or both. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.23.3 KDE Frameworks Version: 5.87.0 Qt Version: 5.15.2 Kernel Version: 5.14.16-zen1-1-zen (64-bit) Graphics Platform: X11 Processors: 12 × AMD Ryzen 5 5600X 6-Core Processor Memory: 15.5 GiB of RAM Graphics Processor: NVIDIA GeForce GT 730/PCIe/SSE2 ADDITIONAL INFORMATION First reported in https://bugs.kde.org/show_bug.cgi?id=439137#c1. I investigated the root cause at https://gitlab.gnome.org/GNOME/gtk/-/issues/4090#note_1309466. I decided to split it out since it's a different issue. This happens by default in GTK4 dialogs, but I was also able to reproduce this effect in a Qt app by calling `dialog->layout()->setSizeConstraint(QLayout::SetFixedSize)` (which disables resizing) after the dialog is shown. -- You are receiving this mail because: You are watching all bug changes.