EsotericSoftware / spine-editor

Issue tracking for the Spine editor.
http://esotericsoftware.com/
28 stars 2 forks source link

`Fullscreen` and `Always On Top` hotkeys do not work on Mac PC #801

Closed misaki-eymard closed 3 weeks ago

misaki-eymard commented 1 month ago

Description: The Full Screen and Always On Top hotkeys are recognized each time they are pressed, but nothing happens on the Mac PC. Here is a video that shows this issue: https://github.com/EsotericSoftware/spine-editor/assets/85478846/143b8d54-4230-4631-a857-422a51400fe6

Expected behavior: Pressing the Full Screen hotkey will make the Spine editor window full screen. Pressing the Always On Top hotkey will make the Spine editor window always appear on top.

Steps to reproduce: Open the editor on a Mac PC and try each of the following hotkeys:

To confirm that these hotkeys are recognized, press cmd + shift + K. This will display the Hotkey Popups.

The version of Spine in which this problem was found: Spine 4.2.29

davidetan commented 4 weeks ago

Fullscreen and Always On Top works only for windows, not for mac. Maybe we shouldn't show the hotkey popup in that case.

davidetan commented 3 weeks ago

To easily prevent popup to show in that case, we could avoid to register the hotkey for non windows environment.

It should be enough to add this if in HotkeysGeneral:

if (isWindows) {
    addHotkey(eitherWelcome, "Fullscreen", () -> titleBar.fullscreenButton);
    addHotkey(eitherWelcome, "Always On Top", () -> frame.setAlwaysOnTop(!frame.isAlwaysOnTop()));
}
davidetan commented 3 weeks ago

On 4.2.33 the two hotkeys are added only in windows sot that popup won't show anymore.