Mark focused view focus_inactive on unfocused output

This commit is contained in:
Mikkel Oscar Lyderik 2016-03-30 00:13:39 +02:00
parent d80466068a
commit 7878de5ccc
3 changed files with 9 additions and 0 deletions

View file

@ -5,6 +5,7 @@
void render_view_borders(wlc_handle view); void render_view_borders(wlc_handle view);
void update_view_border(swayc_t *view); void update_view_border(swayc_t *view);
void map_update_view_border(swayc_t *view, void *data);
int get_font_text_height(const char *font); int get_font_text_height(const char *font);
#endif #endif

View file

@ -170,6 +170,12 @@ static void render_with_title_bar(swayc_t *view, cairo_t *cr, struct border_colo
view->actual_geometry.size.w, 1); view->actual_geometry.size.w, 1);
} }
void map_update_view_border(swayc_t *view, void *data) {
if (view->type == C_VIEW) {
update_view_border(view);
}
}
void update_view_border(swayc_t *view) { void update_view_border(swayc_t *view) {
cairo_t *cr = NULL; cairo_t *cr = NULL;
cairo_surface_t *surface = NULL; cairo_surface_t *surface = NULL;

View file

@ -29,6 +29,8 @@ static void update_focus(swayc_t *c) {
// Case where output changes // Case where output changes
case C_OUTPUT: case C_OUTPUT:
// update borders for views in prev
container_map(prev, map_update_view_border, NULL);
wlc_output_focus(c->handle); wlc_output_focus(c->handle);
break; break;