Skip to content

Fix shortcuts/command palette commands not applying properly with popped out editors - #8925

Merged
4ian merged 4 commits into
masterfrom
claude/gdevelop-dual-monitor-events-n9pnn1
Aug 4, 2026
Merged

Fix shortcuts/command palette commands not applying properly with popped out editors#8925
4ian merged 4 commits into
masterfrom
claude/gdevelop-dual-monitor-events-n9pnn1

Conversation

@4ian

@4ian 4ian commented Aug 4, 2026

Copy link
Copy Markdown
Owner

No description provided.

claude added 4 commits August 4, 2026 12:09
…ditor is popped out

Every window (the main one and each popped out editor window) was sharing
a single command manager. So the commands registered by the editors of all
the windows were mixed together, and the first one registered for a given
command name was the one kept (see `CommandManager.registerCommand`).

Concretely: after popping out an events editor, pressing Shift+A in the
main window added the new event in the popped out window instead of in the
events editor displayed in the main window.

Editors now register their commands in a command manager owned by the
window displaying them, so a shortcut always runs the command of the window
where it was pressed. Commands that are not editor specific (saving the
project, launching a preview, opening a scene...) are still registered on
the shared command manager, and stay reachable from every window.

Also stop listening to the shortcuts sent by the in-game editor in the
popped out windows: the in-game editor is displayed in the main window,
which already handles them - otherwise they would have been run once per
window.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012HSTVbvfgbj7UXLz5bcwCK
Wrap the window in its own command manager at the export of
PoppedOutEditorContainerWindow, instead of in PoppedOutWindows: the
isolation is a property of the popped out window itself, and this keeps
PoppedOutWindows untouched.

Also make the tests fail with a clear error when a command is missing,
instead of comparing potentially null handlers.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012HSTVbvfgbj7UXLz5bcwCK
A component being unmounted or deactivated was removing its command from
the manager by name only. If another component had registered the same
command first (for example, two events editors in two panes), the
deregistration was removing the command of this other component - leaving
the shortcut doing nothing until the editor was remounted.

Deregistration now passes the command object that was registered, and the
manager only removes it if it's still the registered one. Deregistering by
name only is still possible and keeps the previous behavior.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012HSTVbvfgbj7UXLz5bcwCK
- CommandsContextScopedProvider -> ActiveTabCommandsProvider: publishes the
  commands of a tab's editor only while the tab is the active one.
- CommandsContextWindowProvider -> WindowCommandsProvider: isolates the
  commands of the editors of a window from the other windows.
- ScopedCommandManager -> TabCommandManager, and its "_centralManager" is
  now "_windowCommandManager": a tab publishes its commands to the manager
  of its window (there is no central manager anymore). WindowCommandManager
  keeps its "_sharedCommandManager", which holds the commands shared by all
  the windows.

No behavior change.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012HSTVbvfgbj7UXLz5bcwCK
@4ian
4ian merged commit 968a68f into master Aug 4, 2026
5 of 6 checks passed
@4ian
4ian deleted the claude/gdevelop-dual-monitor-events-n9pnn1 branch August 4, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants