From 9da28f0afe4f61d6ffacbba98471ff96338cec73 Mon Sep 17 00:00:00 2001 From: raveit Date: Wed, 24 Apr 2013 14:12:32 +0200 Subject: [PATCH] add compiz_commandline_options_for_button_layout_and_titlebar_font.patch --- ..._for_button_layout_and_titlebar_font.patch | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 compiz_commandline_options_for_button_layout_and_titlebar_font.patch diff --git a/compiz_commandline_options_for_button_layout_and_titlebar_font.patch b/compiz_commandline_options_for_button_layout_and_titlebar_font.patch new file mode 100644 index 0000000..a405d61 --- /dev/null +++ b/compiz_commandline_options_for_button_layout_and_titlebar_font.patch @@ -0,0 +1,60 @@ +diff -uprN compiz-0.8.8-orig/gtk/window-decorator/gtk-window-decorator.c compiz-0.8.8/gtk/window-decorator/gtk-window-decorator.c +--- compiz-0.8.8-orig/gtk/window-decorator/gtk-window-decorator.c 2013-04-18 20:00:33.060716000 +0200 ++++ compiz-0.8.8/gtk/window-decorator/gtk-window-decorator.c 2013-04-18 20:12:32.808023855 +0200 +@@ -6883,6 +6883,7 @@ main (int argc, char *argv[]) + + #ifdef USE_MARCO + char *meta_theme = NULL; ++ char *marco_button_layout = "menu:minimize,maximize,close"; + #endif + + program_name = argv[0]; +@@ -6914,6 +6915,11 @@ main (int argc, char *argv[]) + } + cmdline_options |= CMDLINE_BLUR; + } ++ else if (strcmp (argv[i], "--titlebar-font") == 0) ++ { ++ if (argc > ++i) ++ titlebar_font = pango_font_description_from_string (argv[i]); ++ } + + #ifdef USE_MARCO + else if (strcmp (argv[i], "--opacity") == 0) +@@ -6944,6 +6950,11 @@ main (int argc, char *argv[]) + meta_theme = argv[i]; + cmdline_options |= CMDLINE_THEME; + } ++ else if (strcmp (argv[i], "--button-layout") == 0) ++ { ++ if (argc > ++i) ++ marco_button_layout = argv[i]; ++ } + #endif + + else if (strcmp (argv[i], "--help") == 0) +@@ -6952,6 +6963,7 @@ main (int argc, char *argv[]) + "[--minimal] " + "[--replace] " + "[--blur none|titlebar|all] " ++ "[--titlebar-font FONT] " + + #ifdef USE_MARCO + "[--opacity OPACITY] " +@@ -6959,6 +6971,7 @@ main (int argc, char *argv[]) + "[--active-opacity OPACITY] " + "[--no-active-opacity-shade] " + "[--marco-theme THEME] " ++ "[--button-layout LAYOUT] " + #endif + + "[--help]" +@@ -6985,6 +6998,8 @@ main (int argc, char *argv[]) + theme_update_border_extents = meta_update_border_extents; + theme_get_event_window_position = meta_get_event_window_position; + theme_get_button_position = meta_get_button_position; ++ meta_update_button_layout(marco_button_layout); ++ meta_button_layout_set = TRUE; + } + } + #endif