Skip to content

Conversation

@sprocketc
Copy link
Collaborator

@sprocketc sprocketc commented Aug 24, 2023

Based on this comment, we override the default Window and File menu to disable the close window shortcut on all platforms. This binding seems to annoy a lot of users, and multi-window workflow is not properly supported yet. The menu item itself is preserved. CmdOrCtrl+Q will now be the only shortcut that closes the window. CmdOrCtrl+W is free to be used by plugins or Logseq to dismiss panes etc.

Resolves #3967

@github-actions github-actions bot added the :type/enhancement Enhancement to product. Does not affect the overall basic use. label Aug 24, 2023
@sprocketc sprocketc requested review from andelf and cnrpman August 24, 2023 13:49
Copy link
Collaborator

@andelf andelf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sprocketc sprocketc added the :type/hold Hold this PR. won't merge for now label Aug 25, 2023
@sprocketc sprocketc changed the title Enhance: Disable close window shortcut [WIP] Enhance: Disable close window shortcut Aug 25, 2023
@sprocketc sprocketc changed the title [WIP] Enhance: Disable close window shortcut Enhance: Disable close window shortcut Aug 25, 2023
@sprocketc sprocketc removed the :type/hold Hold this PR. won't merge for now label Aug 25, 2023
@sprocketc
Copy link
Collaborator Author

sprocketc commented Aug 25, 2023

I just realized that we don't have to override windowMenu on mac. Pushed a fix that ensures we would get future updates of the default window submenu on macOS. @andelf Apologies for the back and forth.

@tiensonqin tiensonqin merged commit 361d08d into master Aug 26, 2023
@tiensonqin tiensonqin deleted the enhance/disable-close-window-shortcut branch August 26, 2023 23:28
@stdword
Copy link
Contributor

stdword commented Sep 13, 2023

@sprocketc, how to close only one Logseq window now? ⌘Q quits whole application 🤷‍♂️

@sprocketc
Copy link
Collaborator Author

@stdword Will be handled here #10190
When this is released, ⌘W would close the window, but users will be able to disable or change the binding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:type/enhancement Enhancement to product. Does not affect the overall basic use.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ctrl+w should not close app

5 participants