diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index d7196e3b572..819862d240f 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -6377,7 +6377,9 @@ GHOST_TSuccess GHOST_SystemWayland::getModifierKeys(GHOST_ModifierKeys &keys) co /* NOTE(@ideasman42): it's important to write the XKB state back to #GWL_KeyboardDepressedState * otherwise changes to modifiers in the future wont generate events. * This can cause modifiers to be stuck when switching between windows in GNOME because - * window activation is handled before the keyboard enter callback runs, see: #107314. */ + * window activation is handled before the keyboard enter callback runs, see: #107314. + * Now resolved upstream, keep this for GNOME 45 and older releases & misbehaving compositors + * as the workaround doesn't have significant down-sides. */ int16_t &depressed_l = seat->key_depressed.mods[GHOST_KEY_MODIFIER_TO_INDEX(mod_info.key_l)]; int16_t &depressed_r = seat->key_depressed.mods[GHOST_KEY_MODIFIER_TO_INDEX(mod_info.key_r)]; bool val_l = depressed_l > 0; diff --git a/intern/ghost/intern/GHOST_WindowWayland.cc b/intern/ghost/intern/GHOST_WindowWayland.cc index 8171f16c656..2347e60884e 100644 --- a/intern/ghost/intern/GHOST_WindowWayland.cc +++ b/intern/ghost/intern/GHOST_WindowWayland.cc @@ -1614,7 +1614,7 @@ GHOST_WindowWayland::GHOST_WindowWayland(GHOST_SystemWayland *system, } xdg_toplevel *toplevel = libdecor_frame_get_xdg_toplevel(decor.frame); - gwl_window_state_set_for_xdg(toplevel, state, GHOST_kWindowStateNormal); + gwl_window_state_set_for_xdg(toplevel, state, gwl_window_state_get(window_)); } else #endif /* WITH_GHOST_WAYLAND_LIBDECOR */