diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/split.c | 33 |
1 files changed, 14 insertions, 19 deletions
diff --git a/src/split.c b/src/split.c index f8150f0..eafef7a 100644 --- a/src/split.c +++ b/src/split.c @@ -500,8 +500,18 @@ blank_frame (rp_window_frame *frame) } } -static void -update_frame_indicator () +void +hide_frame_indicator () +{ + /* Only hide the frame indicator if a window occupies the frame */ + if (rp_current_frame->win) + { + XUnmapWindow (dpy, current_screen()->frame_window); + } +} + +void +show_frame_indicator () { screen_info *s = current_screen (); int width, height; @@ -514,28 +524,13 @@ update_frame_indicator () rp_current_frame->y + rp_current_frame->height / 2 - height / 2, width, height); + XMapRaised (dpy, current_screen()->frame_window); + XClearWindow (dpy, s->frame_window); XDrawString (dpy, s->frame_window, s->normal_gc, BAR_X_PADDING, BAR_Y_PADDING + s->font->max_bounds.ascent, FRAME_STRING, strlen (FRAME_STRING)); -} - -void -hide_frame_indicator () -{ - /* Only hide the frame indicator if a window occupies the frame */ - if (rp_current_frame->win) - { - XUnmapWindow (dpy, current_screen()->frame_window); - } -} - -void -show_frame_indicator () -{ - XMapRaised (dpy, current_screen()->frame_window); - update_frame_indicator(); alarm (FRAME_INDICATOR_TIMEOUT); } |