Workaround for bug in mutter that caused first OS window to not have functional CSD when launched from activities
Fixes #4802
This commit is contained in:
parent
d57abb56ce
commit
91b9110dcc
1
glfw/wl_platform.h
vendored
1
glfw/wl_platform.h
vendored
@ -220,6 +220,7 @@ typedef struct _GLFWwindowWayland
|
|||||||
struct {
|
struct {
|
||||||
unsigned int x, y;
|
unsigned int x, y;
|
||||||
} axis_discrete_count;
|
} axis_discrete_count;
|
||||||
|
bool surface_configured_once;
|
||||||
|
|
||||||
uint32_t pending_state;
|
uint32_t pending_state;
|
||||||
struct {
|
struct {
|
||||||
|
|||||||
7
glfw/wl_window.c
vendored
7
glfw/wl_window.c
vendored
@ -490,6 +490,13 @@ static void xdgSurfaceHandleConfigure(void* data,
|
|||||||
uint32_t new_states = window->wl.pending.toplevel_states;
|
uint32_t new_states = window->wl.pending.toplevel_states;
|
||||||
int width = window->wl.pending.width;
|
int width = window->wl.pending.width;
|
||||||
int height = window->wl.pending.height;
|
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
|
||||||
|
window->wl.surface_configured_once = true;
|
||||||
|
debug("Ignoring first zero size surface configure event on mutter.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
window->wl.surface_configured_once = true;
|
||||||
|
|
||||||
if (new_states != window->wl.current.toplevel_states ||
|
if (new_states != window->wl.current.toplevel_states ||
|
||||||
width != window->wl.current.width ||
|
width != window->wl.current.width ||
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user