mirror of
https://github.com/jpochyla/psst.git
synced 2026-04-27 07:25:52 +03:00
[GH-ISSUE #103] CMD+W doesn't close the window on MacOS #76
Labels
No labels
api
bug
build
documentation
duplicate
enhancement
good first issue
help wanted
idea
invalid
linux
lowprio
macos
pull-request
upstream
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/psst#76
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @charlie-collard on GitHub (Aug 17, 2021).
Original GitHub issue: https://github.com/jpochyla/psst/issues/103
Shows this in the console:
@Kethku commented on GitHub (Aug 17, 2021):
I'm not sure this is a bug. IMHO ctrl-w is reserved for closing tabs or windows for applications which have multiple identical components.
@Stooovie commented on GitHub (Aug 17, 2021):
that's for windows. in macos, that's been cmd-w since before windows even existed.
@Kethku commented on GitHub (Aug 17, 2021):
In that case, this is an upstream issue I believe. If its truly universal, then it should be handled in druid I think
@JuliDi commented on GitHub (Aug 18, 2021):
This could be fixed by adding a hotkey that sends
command::CLOSE_WINDOW(https://docs.rs/druid/0.7.0/druid/commands/constant.CLOSE_WINDOW.html). However, this is not intended behaviour for druid on macOS (see https://docs.rs/druid/0.7.0/druid/platform_menus/mac/application/index.html).While implementing the cmd+h
HIDE_WINDOWshortcut yesterday, I have also briefly added cmd+w to sendCLOSE_WINDOW, however, I figured that closing the window doesn't make any sense if you don't want to quit the entire application – the window is gone and so are all your controls. How would you bring back the window once it's closed?What would be your expected behaviour when pressing cmd+w?
Note: I am not sure why the default menu is overridden (entirely?) by psst since I don't understand the comment in
github.com/jpochyla/psst@1d5cf324ef/psst-gui/src/ui/menu.rs (L23-L25)@henrymoulton commented on GitHub (Aug 18, 2021):
CMD + W would close the window but leave music running and the "mini player" active in the top OS menu bar.
CMD + Q would kill everything.
@jpochyla commented on GitHub (Aug 18, 2021):
This is slightly more difficult than it seems, because i.e. the audio output thread is stored in a
PlaybackControllerwidget that would get destroyed on closing the window. I suppose we should tackle this anyway, because "closing" the app to the Windows systray would also be a cool feature.@JuliDi commented on GitHub (Aug 18, 2021):
Thanks for the clarification @jpochyla . I gave it a try and realized that closing the window also stops the music.
I have started looking into rust libraries that provide tray icon functionality but didn't yet find anything. Could the
PlaybackControllerbe held in the tray (if possible) to be more persistent and independent of the window?@peterkos commented on GitHub (Feb 18, 2024):
This should also occur for any windows in the app, like the Settings window. I'm not sure if Windows has a similar convention, but I wanted to note that #443 with
Escwould still needCmd+Won macOS to be consistent w/ macOS conventions :)Interestingly,
Cmd+`to cycle focus between Psst's windows does work between Settings and the main app window 🚀@jacksongoode commented on GitHub (Jul 8, 2024):
Reviving this a bit as it would be a super nice feature with potentially minimal effort with the right package. Just looking around for cross-platform tray managers https://github.com/olback/tray-item-rs and https://github.com/tauri-apps/tray-icon seem somewhat maintained and cross platform (at least to gtk on Linux).
Does anyone have any additional thoughts on this?