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

Win - focus is not switching back to previous application #38

Open
peterdanis opened this issue Sep 8, 2017 · 7 comments · May be fixed by #39
Open

Win - focus is not switching back to previous application #38

peterdanis opened this issue Sep 8, 2017 · 7 comments · May be fixed by #39

Comments

@peterdanis
Copy link

Hi, in Windows focus is not switching back to previous application after hiding hyper with hyperterm-overlay. No window is focused.

Tried with animation true/false, with vanilla hyper+hyperterm-overlay.
Tested on Windows 7 and Windows 10.
On Linux it works fine.

@simonhaenisch
Copy link

simonhaenisch commented Oct 23, 2017

Did you actually try to enable hide on blur in your config? Works for me on macOS:

overlay: {
  hideOnBlur: true,
}

@peterdanis
Copy link
Author

Yes, I have hideOnBlure enabled.

@gabriellima
Copy link

I could manage to "fix" this issue by adding a win.blur() before win.hide(), as questioned at this Electron issue

The code was changed here before line 367

New version:

		//close without animation
		else {
			findFocus();
			this._win.blur();
			this._win.hide();
		}

Also, I should note that I'm not using animation (animate: false option)

I think that a "full" fix (including animation) would be like this (i.e., always calling blur before hide):

		//control the animation
		if(this._config.animate) {
			this._animating = true;

			//animation end bounds
			this._startBounds();

			setTimeout(() => {
				this._animating = false;
				findFocus();
                                this._win.blur();
				this._win.hide();
			}, 250);
		}
		//close without animation
		else {
			findFocus();
			this._win.blur();
			this._win.hide();
		}

@favna
Copy link

favna commented Jun 27, 2018

Looking into this for my fork hyper-overlay and I cannot replicate the issue on Windows 10 build 1803. When I open the overlay then X or - it out my Windows just focuses back to the previous window that was active.

Can you elaborate on steps to reproduce?

@gabriellima
Copy link

@favna try using the "quake style hide" shortcut.

@favna
Copy link

favna commented Jul 2, 2018

I honestly have no idea what the "quake style hide" is

@gabriellima
Copy link

gabriellima commented Jul 12, 2018

Sorry. You said that clicking X or - would "hide" the window, with Focus going back to previous window.

The bug, at least on my case, was happening when using the shortcut to open/hide the overlay, and not when pressing the buttons.

Regarding the "quake style", I'm sorry, it was my mistake to suppose it was a common knowledge.
In my humble opinion, this term started at Quake game, and later on Guake linux "show/hide" terminal.

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 a pull request may close this issue.

4 participants