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

Chrome loses focus when i call hyperterm with a hotkey on Win10 #3

Closed
avxkim opened this issue Aug 4, 2018 · 8 comments
Closed

Chrome loses focus when i call hyperterm with a hotkey on Win10 #3

avxkim opened this issue Aug 4, 2018 · 8 comments

Comments

@avxkim
Copy link

avxkim commented Aug 4, 2018

I saw people has solutions for this issue on a Mac, but nothing on windows.

@favna
Copy link
Owner

favna commented Aug 7, 2018

Back in June I wasn't able to reproduce it but now that I take another look at it I am so I'll have to look into this again

@avxkim
Copy link
Author

avxkim commented Aug 7, 2018

Steps to reproduce this:

  1. Open Chrome.
  2. Open Hyper overlay with a hotkey.
  3. Close Hyper overlay with a hotkey.
  4. Chrome is not focused, i.e. i cant just type in address bar with 1 click, i first need to return focus to chrome by clicking on it.

@favna
Copy link
Owner

favna commented Aug 7, 2018

Yes I can reproduce it with both Chrome and Discord (which is Electron so Chromium I guess). I'll have to debug it

@avxkim
Copy link
Author

avxkim commented Aug 7, 2018

Discord does work just like overlay? You can hide/show it by a hotkey? Issue is in this mechanism i guess, because VSCode when minimized, not causing this bug to chrome.

@favna
Copy link
Owner

favna commented Aug 7, 2018

Your sentence is all jumbled up there but what I meant is that Discord also doesn't gain focus back when closing and while I can't check right now if I'd have to guess I'd say no program at all does.

@avxkim
Copy link
Author

avxkim commented Aug 7, 2018

So you think it would be possible to fix?

@favna
Copy link
Owner

favna commented Aug 7, 2018

I don't know. I'll have to look into it when I have time.

@favna
Copy link
Owner

favna commented Aug 12, 2018

Update: I'm afraid I can't fix it without completely rewriting the plugin. It appears that Electron simply doesn't have a proper API to fetch the last focused window for Windows (it does for MacOS) and the reason it didn't work was because the methods used previously were simply returning null for the _lastFocus rather than the actual window.

It might be possible with something like electron-window-manager but like I said, that would require completely rewriting the plugin from scratch and I'm not looking to do that.

@favna favna closed this as completed Aug 12, 2018
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

No branches or pull requests

2 participants