Bug 484800 - gtk function gtk_window_set_decorated() can set the window titlebar off, but it doesn't work on Wayland KDE. That function works well on gnome Wayland.
Summary: gtk function gtk_window_set_decorated() can set the window titlebar off, but ...
Status: REPORTED
Alias: None
Product: kwin
Classification: Plasma
Component: decorations (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-31 07:41 UTC by JiBe
Modified: 2025-04-17 22:13 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JiBe 2024-03-31 07:41:54 UTC
SUMMARY
gtk+3.0 and gtk4 have a function gtk_window_set_decorated(GtkWindow* window,
  gboolean setting) . 
That function can set the window titlebar off, but it doesn't work on Wayland KDE.
That function works well on gnome Wayland.

STEPS TO REPRODUCE
1. Create a window by using gtk+3.0 or gtk4, and set the titlebar off.
#include <gtk/gtk.h>
int main( int argc, char *argv[])
{
    GtkWidget *window;
    gtk_init(&argc, &argv);
    window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
    gtk_window_set_decorated(GTK_WINDOW (window), 0);
    gtk_widget_show(window);
    gtk_main();
    return 0;
}
2. Compile the program
 gcc -o hello_world $(pkg-config --cflags --libs gtk+-3.0) main.c
3. Run the program
GDK_BACKEND=wayland ./hello_world
OBSERVED RESULT
A blank window with titlebar.
The titlebar doesn't disappear.

EXPECTED RESULT
A blank windows without titlebar.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.0.3
(available in About System)
KDE Plasma Version: 6.0.3
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2

ADDITIONAL INFORMATION
OS: Arch Linux x86_64
WM: KWin (Wayland)
WM Theme: Breeze
Theme: Breeze (Light) [QT], Breeze [GTK2/3]
Icons: breeze [QT], breeze [GTK2/3/4]
Font: Noto Sans CJK SC (10pt) [QT], Noto Sans CJK SC (10pt) [GTK2/3]
Cursor: breeze (24px)
Comment 1 JiBe 2024-04-01 08:50:34 UTC
"https://gitlab.gnome.org/GNOME/gtk/-/issues/5479" May this issue is related.
Comment 2 TraceyC 2025-04-17 22:13:04 UTC
Moving to kwin, which is responsible for window decorations