add compiz_commandline_options_for_button_layout_and_titlebar_font.patch

This commit is contained in:
raveit 2013-04-24 14:12:32 +02:00
parent ff100b1f0a
commit 9da28f0afe

View File

@ -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