Skip to content

Conversation

AlvaroParker
Copy link
Contributor

@AlvaroParker AlvaroParker commented Oct 15, 2025

Closes #ISSUE

A modal dialog window is a window that demands the user's immediate attention and blocks interaction with other parts of the application until it's closed.

  • On Windows this is done by disabling the parent window when the dialog window is created and re-enabling the parent window when closed.
  • On Wayland this is done using the XdgDialog protocol, which hints to the compositor that the dialog should be modal. While compositors like GNOME and KDE block parent interaction automatically, the XDG specification does not guarantee this behavior, compositors may deliver events to the parent window unfiltered. Since the specification explicitly requires clients to implement event filtering logic themselves, this PR implements client-side blocking in GPUI to ensure consistent modal behavior across all Wayland compositors, including those like Hyprland that don't block parent interaction.
  • On X11 this is done by enabling the application window property _NET_WM_STATE_MODAL state.

I'm unable to implement this on MacOS as I lack the experience and the hardware to test it. If anyone is interested on implementing this let me know.

Window Linux MacOS
ModalWindow.mp4
DialogThis.webm
N/A

TODO:

  • Block parent interaction client-side on X11

Release Notes:

  • Added modal dialog window kind on GPUI

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Oct 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement community champion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants