Commit graph

8 commits

Author SHA1 Message Date
PandaDEV
fbd159c68b Fix focus issue when opening Qopy
Fixes #10

Implement platform-specific focus management to prevent the underlying window from losing focus when the shortcut is pressed.

* **src-tauri/src/api/hotkeys.rs**
  - Add platform-specific modules for Windows, macOS, and Linux to manage focus between windows.
  - Modify the `setup` function to use platform-specific APIs to manage focus between windows.
  - Replace `window.set_focus()` with `platform::manage_focus(&window)`.

* **src-tauri/src/api/tray.rs**
  - Add platform-specific modules for Windows, macOS, and Linux to manage focus between windows when the tray menu is used.
  - Modify the `setup` function to use platform-specific APIs to manage focus between windows.
  - Replace `window_clone_for_tray.set_focus()` with `platform::manage_focus(&window_clone_for_tray)`.

* **app.vue**
  - Add `manageFocus` function to handle platform-specific focus management.
  - Call `manageFocus` function when the `change_keybind` event is triggered.

* **src-tauri/src/main.rs**
  - Remove logic to hide the window when it loses focus.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/0PandaDEV/Qopy/issues/10?shareId=XXXX-XXXX-XXXX-XXXX).
2024-11-15 12:29:36 +10:00
PandaDEV
59d31ce5d9
fixed state/manage issues 2024-09-02 21:28:10 +10:00
PandaDEV
5bb6f2249a
added ability to set custom hotkey 2024-09-02 10:37:58 +10:00
PandaDEV
79dd783bf7
added ability to save hotkey into settings 2024-09-01 11:36:08 +10:00
PandaDEV
ebf6e0311f
change keybind test 2024-08-27 17:15:37 +10:00
PandaDEV
fd4ce395f5
fixed display of images 2024-08-27 15:38:01 +10:00
PandaDEV
75583ac6ce
back to normal setup methods 2024-08-25 17:40:52 +10:00
PandaDEV
266b6ff3e1
restructure 2024-08-24 16:03:18 +10:00
Renamed from src-tauri/src/hotkeys.rs (Browse further)