hyperterm-overlay
hyperterm-overlay copied to clipboard
Win - focus is not switching back to previous application
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.
Did you actually try to enable hide on blur in your config? Works for me on macOS:
overlay: {
hideOnBlur: true,
}
Yes, I have hideOnBlure enabled.
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();
}
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?
@Favna try using the "quake style hide" shortcut.
I honestly have no idea what the "quake style hide" is
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.