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

[feat] Shift click on taskbar icon to create new window #5951

Closed
abose opened this issue Dec 31, 2022 · 5 comments
Closed

[feat] Shift click on taskbar icon to create new window #5951

abose opened this issue Dec 31, 2022 · 5 comments

Comments

@abose
Copy link

abose commented Dec 31, 2022

Describe the problem

In Windows, shift-clicking on a taskbar icon will launch another instance of the app. Is there a way to do that in a Tauri window? I couldn't find it in the docs/search.

Attached screen recording below:

shift click

steps:

  1. Open a Tauri demo app in windows.
  2. Press Shift key and click on the taskbar icon.
  3. Observer that nothing happens

Expected behavior:

Another window/app instance should be opened (Or an API to control this behavior).

Describe the solution you'd like

Shift-Click on taskbar APIs in Tauri.

Alternatives considered

No response

Additional context

No response

@amrbashir
Copy link
Member

Shift click your app icon in the taskbar is the same as opening your app second time. If you want to change the behavior to spawn a new window, then use a single-instance plugin like tauri-plugin-single-instance or tauri-plugin-highlander.

@FabianLars
Copy link
Member

@amrbashir the problem is that shift click or middle mouse click has no effect in tauri apps. It does not spawn a new instance, which is the wanted behavior here.

p.s. i tested this locally when we talked about it on discord, both tauri dev and tauri build, the latter before and after installing the msi

@FabianLars FabianLars reopened this Jan 1, 2023
@amrbashir
Copy link
Member

amrbashir commented Jan 2, 2023

@FabianLars Can you please try again, I just tried it, and it just works and There is no special handling for this as far as I researched.
Here is what I tested using examples/api:

  1. Running the app from target/release -> Doesn't work
  2. Create a shortcut for the target/release app and run the shortcut -> Works
  3. Install the app and run the exe directly from the installation directory -> Works
  4. Install the app and run the shortcut in the start menu -> Works

@abose
Copy link
Author

abose commented Jan 2, 2023

@amrbashir The problem is that pressing shift-click on the taskbar icon should open another instance of the app. follow these ### steps:

  1. Open a Tauri demo app in windows.
  2. Press Shift key and click on the taskbar icon.
  3. Observer that nothing happens

Expected behavior:

Another window/app instance should be opened (Or an API to control this behavior).

@FabianLars
Copy link
Member

FabianLars commented Jan 2, 2023

@amrbashir you're right, it works sorry. I think i only tested debug builds (tauri build --debug) which don't work. (probably because of some identifier mismatch because of the terminal wrapper?)

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

No branches or pull requests

3 participants