config: accept “smart” as popup_during_fullscreen parameter (Thanks supplantr)
This was the default, so explicitly setting it is not really necessary, but of course it should be possible. fixes #967
This commit is contained in:
parent
a38749e7e4
commit
7ecdcb61f8
|
@ -229,7 +229,7 @@ state RESTART_STATE:
|
||||||
|
|
||||||
# popup_during_fullscreen
|
# popup_during_fullscreen
|
||||||
state POPUP_DURING_FULLSCREEN:
|
state POPUP_DURING_FULLSCREEN:
|
||||||
value = 'ignore', 'leave_fullscreen'
|
value = 'ignore', 'leave_fullscreen', 'smart'
|
||||||
-> call cfg_popup_during_fullscreen($value)
|
-> call cfg_popup_during_fullscreen($value)
|
||||||
|
|
||||||
# client.background <hexcolor>
|
# client.background <hexcolor>
|
||||||
|
|
|
@ -392,8 +392,13 @@ CFGFUN(restart_state, const char *path) {
|
||||||
}
|
}
|
||||||
|
|
||||||
CFGFUN(popup_during_fullscreen, const char *value) {
|
CFGFUN(popup_during_fullscreen, const char *value) {
|
||||||
config.popup_during_fullscreen =
|
if (strcmp(value, "ignore") == 0) {
|
||||||
(strcmp(value, "ignore") == 0 ? PDF_IGNORE : PDF_LEAVE_FULLSCREEN);
|
config.popup_during_fullscreen = PDF_IGNORE;
|
||||||
|
} else if (strcmp(value, "leave_fullscreen") == 0) {
|
||||||
|
config.popup_during_fullscreen = PDF_LEAVE_FULLSCREEN;
|
||||||
|
} else {
|
||||||
|
config.popup_during_fullscreen = PDF_SMART;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CFGFUN(color_single, const char *colorclass, const char *color) {
|
CFGFUN(color_single, const char *colorclass, const char *color) {
|
||||||
|
|
|
@ -144,6 +144,27 @@ is(parser_calls($config),
|
||||||
$expected,
|
$expected,
|
||||||
'floating_minimum_size ok');
|
'floating_minimum_size ok');
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# popup_during_fullscreen
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
$config = <<'EOT';
|
||||||
|
popup_during_fullscreen ignore
|
||||||
|
popup_during_fullscreen leave_fullscreen
|
||||||
|
popup_during_fullscreen SMArt
|
||||||
|
EOT
|
||||||
|
|
||||||
|
$expected = <<'EOT';
|
||||||
|
cfg_popup_during_fullscreen(ignore)
|
||||||
|
cfg_popup_during_fullscreen(leave_fullscreen)
|
||||||
|
cfg_popup_during_fullscreen(smart)
|
||||||
|
EOT
|
||||||
|
|
||||||
|
is(parser_calls($config),
|
||||||
|
$expected,
|
||||||
|
'popup_during_fullscreen ok');
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# floating_modifier
|
# floating_modifier
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
Loading…
Reference in New Issue