diff options
author | Christian Dywan <christian@twotoasts.de> | 2018-07-25 17:28:37 +0200 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2018-07-25 17:28:37 +0200 |
commit | 9a1e616e06897cdd9f9b0a8547d394cfd19d99a5 (patch) | |
tree | 37e9f06a094e11bfa50aca2ce084af8992dca626 | |
parent | 4a340450c94cd97e7fc6517f22e13dabcdca0601 (diff) | |
download | midori-git-GTK_CSD.tar.gz |
Honor GTK_CSD=0 to disable CSDGTK_CSD
-rw-r--r-- | core/browser.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/browser.vala b/core/browser.vala index ff51f2b2..7b147a4b 100644 --- a/core/browser.vala +++ b/core/browser.vala @@ -179,6 +179,18 @@ namespace Midori { provider.load_from_resource ("/data/gtk3.css"); Gtk.StyleContext.add_provider_for_screen (get_screen (), provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION); + + // Make headerbar (titlebar) the topmost bar if CSD is disabled + if (Environment.get_variable ("GTK_CSD") == "0") { + var titlebar = (Gtk.HeaderBar)get_titlebar (); + titlebar.ref (); + set_titlebar (null); + titlebar.show_close_button = false; + var box = (navigationbar.parent as Gtk.Box); + box.add (titlebar); + box.reorder_child (titlebar, 0); + titlebar.unref (); + } } public Browser (App app) { |