From f616a09a6bf5bdd88e247850976120714d633382 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Deuc=D0=B5?= <shurd@sasktel.net> Date: Wed, 21 Feb 2024 12:13:19 -0500 Subject: [PATCH] First attempt to fix "black bars" startup issue. The first time we receive a MapNotify or ConfigureNotify that sets the width and height, resize the window instead of accepting the current window size. --- src/conio/x_events.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/conio/x_events.c b/src/conio/x_events.c index aaa30626a8..da9173eb25 100644 --- a/src/conio/x_events.c +++ b/src/conio/x_events.c @@ -60,6 +60,7 @@ bool xrender_found; bool xinerama_found; bool xrandr_found; bool x_internal_scaling = true; +bool got_first_resize; /* * Local variables @@ -1466,6 +1467,12 @@ static void handle_resize_event(int width, int height, bool map) pthread_mutex_unlock(&vstatlock); resize_xim(); bitmap_drv_request_pixels(); + if (!got_first_resize) { + if (!fullscreen) { + resize_window(); + got_first_resize = true; + } + } } static void expose_rect(int x, int y, int width, int height) @@ -1606,6 +1613,8 @@ handle_configuration(int w, int h, bool map) pthread_mutex_unlock(&vstatlock); if (resize) handle_resize_event(w, h, map); + if (w && h) + got_first_resize = true; } static void -- GitLab