Skip to content
Snippets Groups Projects
Commit f616a09a authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

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.
parent 50be4441
No related branches found
No related tags found
No related merge requests found
Pipeline #5906 passed
...@@ -60,6 +60,7 @@ bool xrender_found; ...@@ -60,6 +60,7 @@ bool xrender_found;
bool xinerama_found; bool xinerama_found;
bool xrandr_found; bool xrandr_found;
bool x_internal_scaling = true; bool x_internal_scaling = true;
bool got_first_resize;
/* /*
* Local variables * Local variables
...@@ -1466,6 +1467,12 @@ static void handle_resize_event(int width, int height, bool map) ...@@ -1466,6 +1467,12 @@ static void handle_resize_event(int width, int height, bool map)
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
resize_xim(); resize_xim();
bitmap_drv_request_pixels(); 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) static void expose_rect(int x, int y, int width, int height)
...@@ -1606,6 +1613,8 @@ handle_configuration(int w, int h, bool map) ...@@ -1606,6 +1613,8 @@ handle_configuration(int w, int h, bool map)
pthread_mutex_unlock(&vstatlock); pthread_mutex_unlock(&vstatlock);
if (resize) if (resize)
handle_resize_event(w, h, map); handle_resize_event(w, h, map);
if (w && h)
got_first_resize = true;
} }
static void static void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment