Refactor panel refresh; new debug option debug_frames

This commit is contained in:
o9000
2017-03-04 12:19:35 +01:00
parent cb72aa7996
commit d7f294d7c2
14 changed files with 93 additions and 64 deletions

View File

@@ -969,7 +969,7 @@ void autohide_show(void *p)
set_panel_window_geometry(panel);
set_panel_layer(panel, TOP_LAYER);
refresh_systray = TRUE; // ugly hack, because we actually only need to call XSetBackgroundPixmap
panel_refresh = TRUE;
schedule_panel_redraw();
}
void autohide_hide(void *p)
@@ -980,7 +980,7 @@ void autohide_hide(void *p)
panel->is_hidden = TRUE;
XUnmapSubwindows(server.display, panel->main_win); // systray windows
set_panel_window_geometry(panel);
panel_refresh = TRUE;
schedule_panel_redraw();
}
void autohide_trigger_show(Panel *p)
@@ -1065,3 +1065,11 @@ void default_font_changed()
taskbarname_default_font_changed();
tooltip_default_font_changed();
}
void _schedule_panel_redraw(const char *file, const char *function, const int line)
{
panel_refresh = TRUE;
if (debug_fps) {
fprintf(stderr, YELLOW "%s %s %d: triggering panel redraw" RESET "\n", file, function, line);
}
}