fix flickering on startup

This commit is contained in:
Felix Kratz 2022-06-07 08:41:01 +02:00
parent af5f11d06a
commit 8eb65c844a
2 changed files with 5 additions and 0 deletions

View file

@ -313,6 +313,8 @@ void bar_create_window(struct bar* bar) {
window_set_level(&bar->window, g_bar_manager.window_level);
SLSOrderWindow(g_connection, bar->window.id, 1, 0);
context_set_font_smoothing(bar->window.context, g_bar_manager.font_smoothing);
CGContextClearRect(bar->window.context, bar->window.frame);
CGContextFlush(bar->window.context);
}
struct bar *bar_create(uint32_t did) {

View file

@ -172,7 +172,10 @@ int main(int argc, char **argv) {
mouse_begin();
display_begin();
workspace_event_handler_begin(&g_workspace_context);
windows_freeze();
bar_manager_begin(&g_bar_manager);
windows_unfreeze();
if (!mach_server_begin(&g_mach_server, mach_message_handler))
error("sketchybar: could not initialize daemon! abort..\n");