GNOME Bugzilla – Bug 782117
If a window was initially shown undecorated and set_decorated(True) is called, titlebar is drawn inside the window
Last modified: 2017-05-22 07:57:16 UTC
Created attachment 350963 [details] A demo python3 script Steps to reproduce: 0. on a GNOME/Wayland session, 1. create a window with decorations 2. show the window 3. unset the decorations using gtk_window_set_decorated(window, false) What happens: The window messes up, drawing the titlebar way inside the window. What should happen: Do not draw the titlebar inside the window. Affected version: gtk3-3.22.12-2.fc25.x86_64 Additional info: This issue is not present on x11 with GDK_BACKEND=x11 enforced on a GNOME/Wayland session. I know that the documentation specifies that unsetting the decoration may fail, but since Gtk+ on Wayland uses client-side decorations, there is no window manager to blame. To reproduce, simply run the attached python script with > python3 test_window_decoration_on_wayland.py inside a GNOME/wayland session. If you run it with > GDK_BACKEND=x11 python3 test_window_decoration_on_wayland.py instead, it will work fine.
Created attachment 350964 [details] A screenshot of the window on wayland after reproducing the bug
But it's not Wayland backend, it's gtk+ CSD code, the exact same issue occurs with "GDK_BACKEND=x11 GTK_CSD=1 python test_window_decoration.py" as well :)
(In reply to Olivier Fourdan from comment #2) > But it's not Wayland backend, it's gtk+ CSD code, the exact same issue > occurs with "GDK_BACKEND=x11 GTK_CSD=1 python test_window_decoration.py" as > well :) Oops, nice catch, thanks for the correction.
Created attachment 350970 [details] [review] [PATCH] gtkwindow: Hide CSD title bar when undecorated When switching from decorated to undecorated, the title bar should be hidden as well.
Review of attachment 350970 [details] [review]: Same thing I stumbled upon in https://git.gnome.org/browse/gtk+/commit/?h=wip/carlosg/event-delivery&id=cf130b4b4b127cfaf1f7e350e49e7ec745199da5, so lgtm.
Comment on attachment 350970 [details] [review] [PATCH] gtkwindow: Hide CSD title bar when undecorated attachment 350970 [details] [review] pushed to branch gtk-3-22 as commit 5209995 - gtkwindow: Hide CSD title bar when undecorated