Add 'maximize_hide_bar' to also hide the bar when maximing a window.

This commit is contained in:
Yuri D'Elia 2014-09-06 15:43:55 +02:00 committed by Marco Peereboom
parent f78f487b20
commit 5a6f9473f2
3 changed files with 13 additions and 1 deletions

View file

@ -315,6 +315,11 @@ and changes to layout.
.It Ar manual
Set window focus on window interaction only.
.El
.It Ic maximize_hide_bar
When set to 1,
.Ic maximize_toggle
will also hide/restore the bar visibility of the affected workspace.
Defaults to 0.
.It Ic java_workaround
Workaround a Java GUI rendering issue on non-reparenting window managers by
impersonating the LG3D window manager, written by Sun.

View file

@ -404,6 +404,7 @@ char *bar_format = NULL;
bool stack_enabled = true;
bool clock_enabled = true;
bool iconic_enabled = false;
bool maximize_hide_bar = false;
bool urgent_enabled = false;
bool urgent_collapse = false;
char *clock_format = NULL;
@ -4654,7 +4655,7 @@ update_floater(struct ws_win *win)
win->g = r->g;
if (bar_enabled && ws->bar_enabled) {
if (bar_enabled && ws->bar_enabled && !maximize_hide_bar) {
if (!bar_at_bottom)
Y(win) += bar_height;
HEIGHT(win) -= bar_height;
@ -8036,6 +8037,7 @@ enum {
SWM_S_FOCUS_MODE,
SWM_S_ICONIC_ENABLED,
SWM_S_JAVA_WORKAROUND,
SWM_S_MAXIMIZE_HIDE_BAR,
SWM_S_REGION_PADDING,
SWM_S_SPAWN_ORDER,
SWM_S_SPAWN_TERM,
@ -8209,6 +8211,9 @@ setconfvalue(const char *selector, const char *value, int flags)
case SWM_S_JAVA_WORKAROUND:
java_workaround = (atoi(value) != 0);
break;
case SWM_S_MAXIMIZE_HIDE_BAR:
maximize_hide_bar = atoi(value);
break;
case SWM_S_REGION_PADDING:
region_padding = atoi(value);
if (region_padding < 0)
@ -8624,6 +8629,7 @@ struct config_option configopt[] = {
{ "focus_mode", setconfvalue, SWM_S_FOCUS_MODE },
{ "iconic_enabled", setconfvalue, SWM_S_ICONIC_ENABLED },
{ "java_workaround", setconfvalue, SWM_S_JAVA_WORKAROUND },
{ "maximize_hide_bar", setconfvalue, SWM_S_MAXIMIZE_HIDE_BAR },
{ "keyboard_mapping", setkeymapping, 0 },
{ "layout", setlayout, 0 },
{ "modkey", setconfmodkey, 0 },

View file

@ -43,6 +43,7 @@
# clock_enabled = 1
# clock_format = %a %b %d %R %Z %Y
# iconic_enabled = 0
# maximize_hide_bar = 0
# window_class_enabled = 0
# window_instance_enabled = 0
# window_name_enabled = 0