From 9837531b638e1b303c31e15b0e290e513e4f9430 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Tue, 28 May 2024 09:12:37 +0530 Subject: [PATCH] Wayland: Fix a regression in 0.34 that caused the tab bar to not render in second and subsequent OS Windows under Hyprland Fixes #7413 --- docs/changelog.rst | 6 ++++++ kitty/glfw.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 0c2cab0e3..520d803eb 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -50,6 +50,12 @@ consumption to do the same tasks. Detailed list of changes ------------------------------------- +0.35.1 [future] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +- Wayland: Fix a regression in 0.34 that caused the tab bar to not render in second and subsequent OS Windows under Hyprland (:iss:`7413`) + + 0.35.0 [2024-05-25] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/kitty/glfw.c b/kitty/glfw.c index 96bd5ab04..3f757856b 100644 --- a/kitty/glfw.c +++ b/kitty/glfw.c @@ -1226,6 +1226,8 @@ create_os_window(PyObject UNUSED *self, PyObject *args, PyObject *kw) { #ifndef __APPLE__ is_apple = false; glfwShowWindow(glfw_window); + // On Wayland glfwShowWindow spins the event loop, which could include resize events for other OS Windows causing the context to change + if (glfwGetCurrentContext() != glfw_window) glfwMakeContextCurrent(glfw_window); #endif if (global_state.is_wayland || is_apple) { float n_xscale, n_yscale;