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
This commit is contained in:
Kovid Goyal 2024-05-28 09:12:37 +05:30
parent 149a26ce51
commit 9837531b63
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 8 additions and 0 deletions

View file

@ -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]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View file

@ -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;