You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expect the app window to get hidden if I click the tray icon a second time (or when app window is already visible).
Looking at the function that gets fired on tray click, I can see the problem.
privateasyncclicked(event?: Electron.KeyboardEvent,bounds?: Electron.Rectangle): Promise<void>{if(event&&(event.shiftKey||event.ctrlKey||event.metaKey)){returnthis.hideWindow();}// this will always return falseif(this._browserWindow&&this._browserWindow.isVisible()){returnthis.hideWindow();<---------------------------// never fired on windows}this._cachedBounds=bounds||this._cachedBounds;awaitthis.showWindow(this._cachedBounds);}
hideWindow() is never called on tray click because the browserWindow's blur event is fired first and it hides the window, so it becomes not visible => which causes the flickering
1) user clicks tray while window is already shown
2) focus is lost => "blur" event callback is triggered => hide window
3) clicked is called => window is not visible => show window again (flicker)
Steps to Reproduce the Problem
Use Menubar on Windows
Click tray to show Window
Click tray again to hide it
Expected Behaviour
App window should get hidden on tray click if window is already visible
Actual Behaviour
App window flickers
Specifications
Menubar version: 8.0.0
Platform: Windows 10
Electron version: 8.1.1
Screen Recording
Other information
I tried to mess around with setTimeout and isAlwaysOnTop but I never found a good consistent solution.
Thanks in advance!
The text was updated successfully, but these errors were encountered:
Description
I expect the app window to get hidden if I click the tray icon a second time (or when app window is already visible).
Looking at the function that gets fired on tray click, I can see the problem.
hideWindow()
is never called on tray click because the browserWindow'sblur
event is fired first and it hides the window, so it becomes not visible => which causes the flickeringSteps to Reproduce the Problem
Expected Behaviour
App window should get hidden on tray click if window is already visible
Actual Behaviour
App window flickers
Specifications
Screen Recording
Other information
I tried to mess around with
setTimeout
andisAlwaysOnTop
but I never found a good consistent solution.Thanks in advance!
The text was updated successfully, but these errors were encountered: