From 8627a00e3b25cdd80d88ddcef9d2d73cc784d571 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Tue, 2 Feb 2016 09:10:38 +0100 Subject: Gtk UI: added option --no-csd to disable client-side decorations * many WMs like Unity or even Awesome WM have problems with client-side decorations. Awesome WM for instance does not allow us to move or resize floating windows with CSDs. Also, the added close button does not make sense for tiling window managers and since they usually never show window title bars, CSD brings no advantages at all on tiling window managers. * Other window managers might not support CSD at all. * There is AFAIK no way to detect whether CSDs will be possible or whether there will be glitches (see Awesome). * Added command line option --no-csd in the --help-gtk group. This can be added to desktop shortcuts etc. Later there might be better ways to configure stuff like that, e.g. when we add support for scripted UI customizations. --- src/interface-gtk/interface-gtk.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/interface-gtk/interface-gtk.h') diff --git a/src/interface-gtk/interface-gtk.h b/src/interface-gtk/interface-gtk.h index a3a0af6..4563d5f 100644 --- a/src/interface-gtk/interface-gtk.h +++ b/src/interface-gtk/interface-gtk.h @@ -84,6 +84,7 @@ typedef class InterfaceGtk : public Interface { INFO_TYPE_QREGISTER } info_type; gchar *info_current; + gboolean use_csd; GtkWidget *info_bar_widget; GtkWidget *info_image; @@ -105,6 +106,7 @@ public: window(NULL), vbox(NULL), info_type(INFO_TYPE_BUFFER), info_current(NULL), + use_csd(TRUE), info_bar_widget(NULL), info_image(NULL), event_box_widget(NULL), message_bar_widget(NULL), message_widget(NULL), @@ -115,11 +117,7 @@ public: ~InterfaceGtk(); /* overrides Interface::get_options() */ - inline GOptionGroup * - get_options(void) - { - return gtk_get_option_group(TRUE); - } + GOptionGroup *get_options(void); /* implementation of Interface::main() */ void main_impl(int &argc, char **&argv); -- cgit v1.2.3