summaryrefslogtreecommitdiffstats
path: root/window.c
diff options
context:
space:
mode:
authorBert Münnich <ber.t@gmx.com>2012-02-15 22:33:39 +0100
committerBert Münnich <ber.t@gmx.com>2012-02-15 22:33:39 +0100
commitc666d30eeacd6faf41dce50b301ad2fe3195fdb8 (patch)
treebd0085c26be88c75e13386f3304542345cea6702 /window.c
parent011dac90c83d5440f2f228deab93f264d87b15d0 (diff)
downloadnsxiv-c666d30eeacd6faf41dce50b301ad2fe3195fdb8.tar.zst
Added it_toggle_bar command; default mapping: XK_b
Diffstat (limited to 'window.c')
-rw-r--r--window.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/window.c b/window.c
index 7f36281..673852c 100644
--- a/window.c
+++ b/window.c
@@ -306,6 +306,19 @@ void win_toggle_fullscreen(win_t *win) {
SubstructureNotifyMask | SubstructureRedirectMask, &ev);
}
+void win_toggle_bar(win_t *win) {
+ if (win == NULL || win->xwin == None)
+ return;
+
+ if (win->barh != 0) {
+ win->h += win->barh;
+ win->barh = 0;
+ } else {
+ win->barh = font.ascent + font.descent + 2 * V_TEXT_PAD;
+ win->h -= win->barh;
+ }
+}
+
void win_clear(win_t *win) {
win_env_t *e;