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

System tray improvements #1084

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

ahayzen
Copy link

@ahayzen ahayzen commented Mar 2, 2021

  • Do not block at startup for a period of time when there is no system tray
  • if there is no system tray, quit when the last window closes
  • If there is no system tray, disable the settings for autohide / minimise to tray

I have changed how the timer works for ensuring that the user does not get stuck with a hidden window. Instead of always waiting for the system tray to become available before deciding if to disable autohide or show the window. Now we perform showing the window or starting hidden. If we start hidden and the systemtray was not available, we then wait a period of time to check it's not being slow at becoming available, then we force the window to show.

As you can see in the table below this removes the potential for waiting at startup from the 4 different startup procedures to just 1. And this use case is an unlikely scenario now that the settings are disabled if the system tray isn't available (the user would have had to enable autohide when the system tray was available and then disable the system tray on their system).

Scenario Before After
autohide=false, systemtray=true Wait for system tray to become available (success), then show the window Show the window
autohide=true, systemtray=true Wait for system tray to become available (success), then start with hidden window Start with hidden window
autohide=false, systemtray=false Wait for system tray to become available (fails), then show the window Show the window
autohide=true, systemtray=false Wait for system tray to become available (fails), then show the window Start with the window hidden, wait a period of time to check if the system tray becomes available (fails), then show the window

Before in all cases we would wait for the system tray for a period
of time, this would block users who don't have autohide enabled
and don't have a system tray from seeing the window.

Instead flip this around to either hide the window at startup if
autohide is enabled and show if it isn't. Then if we have opened
hidden wait a period of time and check if system tray is available,
if it isn't then force the window to be shown.

This provides much better UX for the general cases.

Closes debauchee#1024
@p12tic
Copy link
Member

p12tic commented Jun 25, 2021

Looks great on a preliminary review, will look a little deeper later. Thanks a lot for working on this and sorry for the delay in reviewing.

@darkblaze69
Copy link

Hi, could you rebase it here ? input-leap/input-leap#1084

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

Successfully merging this pull request may close these issues.

3 participants