All contributions

godotengine/godot

Godot Engine

An open source, multi-platform 2D and 3D game engine with its own editor, where game developers build scenes and interfaces.

Language
C++
GitHub stars
120,623
Merged changes
1
Project site
godotengine.org

What we changed

On X11 with embedded subwindows turned off, closing a submenu with an active search bar now returns focus to the parent menu, so it reacts to the mouse again.

What this work shows

  • X11 focus and override-redirect windows
  • IME handling in popup windows
  • An engine platform layer in C++
What was broken

The parent menu stopped reacting to the mouse

With embed_subwindows off on X11, after closing a submenu whose search bar had focus, the PopupMenu no longer highlighted items or reacted to clicks. Popups are override-redirect windows, so focus went back to the main window instead of the parent menu.

How we fixed it

Focus returns to the parent popup

grab_focus() cannot help here, because the window manager ignores _NET_ACTIVE_WINDOW for override-redirect windows. window_set_transient() therefore sets the input focus back on the parent popup when the closing popup held it through the IME.

#124841

Merged change 1

  1. #124841 Return X11 focus to parent popup when closing a nested popup with active IME Merged 27 October 2026

What it taught us

Where the engine, the X11 protocol and the window manager meet, the obvious fix can fail because the window manager ignores the activation request, so the first job is to find who really decides. The fix is small because it covers one precisely described case.

Other projects we write code for

Describe your project.

A free quote comes back within an hour during working hours.