Also check if states are empty

This commit is contained in:
Kovid Goyal 2022-03-17 17:51:21 +05:30
parent 91b9110dcc
commit 06da2b88ff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

11
glfw/wl_window.c vendored
View File

@ -490,13 +490,14 @@ static void xdgSurfaceHandleConfigure(void* data,
uint32_t new_states = window->wl.pending.toplevel_states;
int width = window->wl.pending.width;
int height = window->wl.pending.height;
if (!window->wl.surface_configured_once && !width && !height && !window->wl.decorations.serverSide && getenv("XAUTHORITY") && strstr(getenv("XAUTHORITY"), "mutter")) {
// https://github.com/kovidgoyal/kitty/issues/4802
if (!window->wl.surface_configured_once) {
window->wl.surface_configured_once = true;
debug("Ignoring first zero size surface configure event on mutter.\n");
return;
if (!width && !height && !new_states && !window->wl.decorations.serverSide && getenv("XAUTHORITY") && strstr(getenv("XAUTHORITY"), "mutter")) {
// https://github.com/kovidgoyal/kitty/issues/4802
debug("Ignoring first empty surface configure event on mutter.\n");
return;
}
}
window->wl.surface_configured_once = true;
if (new_states != window->wl.current.toplevel_states ||
width != window->wl.current.width ||