Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open Qopy without losing focus #10

Open
alije123 opened this issue Aug 28, 2024 · 1 comment
Open

Open Qopy without losing focus #10

alije123 opened this issue Aug 28, 2024 · 1 comment
Assignees
Labels
Feature A feature request Wanted A feature that is wanted by users.

Comments

@alije123
Copy link

alije123 commented Aug 28, 2024

When shortcut pressed, it should not steal the focus from the underlying window like the native windows clipboard history.

@alije123 alije123 added the Feature A feature request label Aug 28, 2024
@0PandaDEV
Copy link
Owner

I'm not sure if this is possible, but I will take a look into it because I know that this is a problem.

@0PandaDEV 0PandaDEV added the Wanted A feature that is wanted by users. label Sep 19, 2024
@0PandaDEV 0PandaDEV pinned this issue Sep 19, 2024
@0PandaDEV 0PandaDEV changed the title Open clipboard history window without losing focus Open Qopy without losing focus Nov 15, 2024
0PandaDEV added a commit that referenced this issue Nov 15, 2024
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).
@0PandaDEV 0PandaDEV unpinned this issue Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature A feature request Wanted A feature that is wanted by users.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants