diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 4ff32304c8d..aaf2b095ed3 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -796,6 +796,11 @@ static void layer_surface_handle_configure(void* data, struct zwlr_layer_surface_v1* surface, uint32_t serial, uint32_t width, uint32_t height) { debug("Layer shell configure event: width: %u height: %u\n", width, height); _GLFWwindow* window = data; + if (!window->wl.surface_configured_once) { + window->swaps_disallowed = false; + window->wl.waiting_for_swap_to_commit = true; + window->wl.surface_configured_once = true; + } GLFWvidmode m = {0}; if (window->wl.monitorsCount) _glfwPlatformGetVideoMode(window->wl.monitors[0], &m); window->wl.layer_shell.config.size_callback( @@ -806,8 +811,8 @@ layer_surface_handle_configure(void* data, struct zwlr_layer_surface_v1* surface _glfwInputWindowSize(window, width, height); window->wl.width = width; window->wl.height = height; resizeFramebuffer(window); - _glfwInputWindowDamage(window); } + _glfwInputWindowDamage(window); commit_window_surface_if_safe(window); } diff --git a/kitty/glfw.c b/kitty/glfw.c index c41c95b64e9..827d09b2f26 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -1076,6 +1076,7 @@ edge_spacing(GLFWEdge which) { static void calculate_layer_shell_window_size( GLFWwindow *window, const GLFWLayerShellConfig *config, unsigned monitor_width, unsigned monitor_height, uint32_t *width, uint32_t *height) { + request_tick_callback(); if (config->type == GLFW_LAYER_SHELL_BACKGROUND) { if (!*width) *width = monitor_width; if (!*height) *height = monitor_height; @@ -1332,6 +1333,7 @@ create_os_window(PyObject UNUSED *self, PyObject *args, PyObject *kw) { // macOS: Show the window after it is ready glfwShowWindow(glfw_window); #endif + w->is_damaged = true; return PyLong_FromUnsignedLongLong(w->id); }