overlayed icon indicating copy to clipboard operation
overlayed copied to clipboard

Hide Taskbar icon if overlay is pinned

Open samfry13 opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. On Windows, the overlay window stays present on the taskbar even when the overlay is pinned (i.e. hidden) and the user is not in a call

Describe the solution you'd like If the user has the overlay pinned, don't show a window on the taskbar

Describe alternatives you've considered N/A

Additional context

Screenshot
image

Tauri has a setting for skipping the taskbar. This could potentially be set/unset when the user pins/unpins the overlay window respectively

samfry13 avatar Aug 24 '24 21:08 samfry13

Yeah I'll think we can support this but as an opt-in. We'd want something like this for the config:

  • windowsHideFromTaskbarWhenPinned (for windows we can call set_skip_taskbar
  • macHideFromDockWhenPinned (for macOS we can call a custom impl to chage set_activation_policy to Accessory)
  • Linux (no idea 😂)

@ahkohd can we change the activation policy dynamically at runtime so that when pinning we make it hidden from the dock and unpinning it goes back to normal?

Hacksore avatar Aug 25 '24 16:08 Hacksore

I believe set_skip_taskbar works for both windows and linux. It's just MacOS that isn't supported from that method.

samfry13 avatar Aug 26 '24 15:08 samfry13

Yeah I'll think we can support this but as an opt-in. We'd want something like this for the config:

* `windowsHideFromTaskbarWhenPinned` (for windows we can call [set_skip_taskbar](https://docs.rs/tauri/latest/tauri/window/struct.Window.html#method.set_skip_taskbar)

* `macHideFromDockWhenPinned` (for macOS we can call a custom impl to chage `set_activation_policy` to `Accessory`)

* Linux (no idea 😂)

@ahkohd can we change the activation policy dynamically at runtime so that when pinning we make it hidden from the dock and unpinning it goes back to normal?

The activation policy is called in the Tauri setup function, which is already running at runtime. This should make it possible.

ahkohd avatar Aug 26 '24 22:08 ahkohd

As it is I feel like there isn't much point to having a taskbar icon since it doesn't seem to serve any function, at least not on Windows. It doesn't seem to be possible to minimize the window, so you don't need to click on the icon to restore it. Clicking on the icon could maybe unpin the window to allow you to interact with it, but currently it doesn't do anything but give the invisible window focus. Right clicking on the icon and clicking 'Close Window' does nothing, nor does giving it focus and pressing alt+F4.

I don't really see what function the task bar icon serves right now aside from indicating to the user that Overlayed is running, which the system tray icon does just as well along with many other more useful functions.

If made an option I would vote that the default option be to keep it hidden.

BlacRyu avatar Mar 15 '25 23:03 BlacRyu