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

hideOnBlur doesn't work on Linux #72

Closed
2 tasks done
mwoz123 opened this issue Sep 7, 2021 · 7 comments · Fixed by #75
Closed
2 tasks done

hideOnBlur doesn't work on Linux #72

mwoz123 opened this issue Sep 7, 2021 · 7 comments · Fixed by #75

Comments

@mwoz123
Copy link
Contributor

mwoz123 commented Sep 7, 2021

  • I am on the latest hyperterm-summon version
  • I have searched the issues of this repo and believe that this is not a duplicate

Issue

hideOnBlur setting is ignored on Linux.
It doesn't matter if it is set to false, true or configuration key-value pair doesnt' exist - Hyper term window is always hidden after losing focus (alt-tab or mouse click on different window).

Steps to Reproduce

  1. set hideOnBlur: false, in .hyper.js
  2. wait until config is reloaded, quit hyper
  3. start hyper again
  4. alt+tab or click on another window

Expected Result

Hyper term window should still be visible, might be hover under another window

Actual Result

Hyper term window is hidden - can be restored with hotkey, but should be still visible

References:

might be related to: #56 or #59

@mwoz123 mwoz123 changed the title hideOnBlur make any effects on Linux hideOnBlur doesn't work on Linux Sep 7, 2021
@dcalhoun
Copy link
Collaborator

dcalhoun commented Sep 7, 2021

Thanks for the report. I do agree with you that this is related to the changes made in #59, as it explicitly disabled support for hideOnBlur.

Unfortunately, I do not have an Ubuntu environment to test the plugins against and I do not believe I will have time to debug it soon. If you are willing, you could setup hyperterm-summon to run as a "local" plugin, so that you could modify the source and see the results in your local Hyper.

@mwoz123
Copy link
Contributor Author

mwoz123 commented Mar 31, 2022

I can test using Ubuntu 20.04 KDE and Gnome,

I did quick tests with hyper 3.1.3. and change in app.js:

 - if (!config.hideOnBlur && process.platform !== 'linux') {
 +  if (!config.hideOnBlur) {

and didn' spot any issues with blur nor hotkey.
Was it an Electron issue?

Any particular scenarios I should test ?

@dcalhoun
Copy link
Collaborator

dcalhoun commented Apr 1, 2022

I did quick tests with hyper 3.1.3. and change in app.js:

 - if (!config.hideOnBlur && process.platform !== 'linux') {
 +  if (!config.hideOnBlur) {

and didn' spot any issues with blur nor hotkey. Was it an Electron issue?

@mwoz123 are you implying this change fixed hideOnBlur for Linux? Never mind, I forgot this issue is focused upon the fact that you are currently unable to change the behavior on Linux using hideOnBlur. Your shared code changes make total sense to address that.

Any particular scenarios I should test ?

My recommendation would be to verify the issues reported in #56 no longer occur. My understanding of #56 is that interacting with the task bar broke summoning Hyper with a hotkey. Thank you for investigating this! 🙇🏻

@mwoz123
Copy link
Contributor Author

mwoz123 commented Apr 2, 2022

my test results .

Env:

Operating System: Ubuntu 20.04
KDE Plasma Version: 5.18.8
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

Config:

        summon: {
            hideDock: false,
            hotkey: 'Ctrl+.'
        }

Results:

  1. hyper visible, active, taskbar icon is visible - clicked on taskbar hyper icon -> hyper is minimized to taskbar, icon is visible in taskbar
  2. hyper not visible, minimalized to taskbar - clicked on taskbar hyper icon -> hyper is restored, active, hyper icon is active and visible in taskbar
  3. hyper visible, active, icon is visible in taskbar - hotkey pressed - hides hypper, no icon in taskbar visible
  4. hyper hidden with hotkey (icon not visible in taskbar) - hotkey pressed -  hyper is visible and active 
  5. hyper visible, not active (another non-hyper window is active) - hotkey pressed - hyper icon is shown, hyper is active
  6. hyper hidden by clicking on active taskbar hyper icon -> hyper hotkey -> hyper is restored, active
  7. hyper is visible -> alt+tab -> hyper window is visible, is visible in taskbar but not active 
  8. hyper hidden by hotkey - no ability to restore without hotkey as it's not visible in taksbar - well but as you hide it with hotkey you can restore it with hotkey

Losing focus on hyper doesn't hide it in none of the scenarios 

exaclty same results for :

      summon: {
          hideDock: false,
          hideOnBlur: false,
          hotkey: 'Ctrl+.'
},

I didn't spot false is default for hideOnBlue :|

Config 2: 

        summon: {
          hideDock: false,
          hideOnBlur: true,
          hotkey: 'Ctrl+.'
},

Results:

  1. hyper is visible, active -> alt +tab -> hyper window is hidden, is also hidden from taskbar
  2. hyper is not visible in taskbar, nor its window is visible-> hotkey -> hyper is visible, active, visible in taskbar
  3. hyper is visible, active-> minimalizing by clicking on taskbar icon -> hyper is visible, visible in taskbar
  4. hyper is minimalized to taskbar -> clicking on other taskbar icon doesn't hide it from taksbar

IMHO based on above I'd say hideOnBlur is usable in linux (with my above change).

What you think guys ? Do you need any more tests ?

@mwoz123
Copy link
Contributor Author

mwoz123 commented Apr 2, 2022

If I understand correctly #56, my sceniorios 3. 4. 5.(!) 6. 8. prove it works :

  • not only if you hide it prior to switching to another application
  • or Hyper is visible in the taskbar and focused.

@dcalhoun
Copy link
Collaborator

dcalhoun commented Apr 4, 2022

@mwoz123 thank you for testing all these scenarios. 🙇🏻 Will you please test the following specific scenario? If this scenario succeeds for you, I welcome a PR with your proposed changes. Thanks!

  1. Add hideOnBlur: false to your Hyper configuration.
  2. Use the hyperterm-summon hotkey to show Hyper.
  3. Click a different app icon in the taskbar (i.e. not Hyper) to change focus away from Hyper.
  4. Use the hyperterm-summon hotkey to show Hyper.
  5. 👀 Verify the Hyper window is visible and focused.

mwoz123 added a commit to mwoz123/hyperterm-summon that referenced this issue Apr 4, 2022
@mwoz123
Copy link
Contributor Author

mwoz123 commented Apr 4, 2022

@dcalhoun test passed. PR #75 ;)

@dcalhoun dcalhoun linked a pull request Apr 9, 2022 that will close this issue
dcalhoun pushed a commit that referenced this issue Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants