Index of /doc/gtk3-nocsd

[ICO]NameLast modifiedSizeDescription

[PARENTDIR]Parent Directory  -  
[   ]README.Debian2016-05-31 15:21 1.9K 
[TXT]README.html2018-03-02 23:46 4.2K 
[TXT]README.md2016-05-31 14:05 3.7K 
[   ]TODO2016-05-31 14:05 555  
[   ]changelog.Debian.gz2018-03-02 23:46 712  
[   ]copyright2016-05-31 15:21 1.2K 
[IMG]gedit-with-csd.png2016-05-31 14:05 18K 
[IMG]gedit-without-csd.png2018-03-02 23:46 12K 

gtk3-nocsd README

gtk3-nocsd

gtk3-nocsd is a small module used to disable the client side decoration of Gtk+ 3.

Introduction:

Since Gtk+ 3.10, its developers added a so-called header bar or custom title bar. With this and the client-side decoration, the original title bar and window border provided by the window manager are disabled by Gtk+. This makes all Gtk+ 3 programs look alike. Even worse, this may break some window manager or compositors.

Unfortunately, the Gtk+ developers decided to be against the existing standards and provide "no option" to turn it off.

Luckily, with gtk3-nocsd, we still have a way to (partially) turn it off. Window manager (title bar and window border) can be re-enabled.

Preview:

This is how the gtk3 windows look like before and after using gtk3-nocsd.

Screenshot of gedit with CSDs still enabled

Screenshot of gedit with CSDs disabled by gtk3-nocsd

How to use:

Distribution packages:

gtk3-nocsd is packaged in Debian's unstable and testing distributions, see gtk3-nocsd in Debian's package database. The Debian package already comes with integration code to automatically disable CSDs when installed, so after package installation only a re-login is required to have CSDs disabled on non-GNOME desktops.

How it works:

$LD_PRELOAD is used to override several Gdk and glib/gobject APIs to intercept related calls Gtk+ 3 uses to setup CSDs. For older versions of Gtk+ 3, while it is trying to initialize CSDs, it is led to believe that there is no compositor available, so CSDs are not added. For later Gtk+ 3 versions (3.16.1+), the gtk_window_set_titlebar method is reimplemented, as tricking Gtk+ 3 into thinking the compositor is disabled has side effects and is not sufficent anymore.

Additionally, as gtkwindowsettitlebar is also called from Gtk+ internally (and LDPRELOAD cannot override function calls within a library), several other places in Gtk+3 (e.g. buildable interfaces for GtkWindow and GtkDialog) are also overridden to ensure that CSDs are disabled.