Prevent visual flash


#1

Hello,

I’m creating an app visually similar to Alfred to manage and search for my bookmarks. Its working well, but when I do a search and open a bookmark, I immediately hide the app and when I invoke it, it return to the default mode doing a visual flash. The reset to default is triggered right before hiding the app.

I don’t know how to avoid this flashing problem…

I use ready-to-show when starting the application, and it works well.

Any ideas would be greeted. Thank you.


#2

How did you do that? I mean what do you do when you hide the app (or BrowserWindow in my understanding), and which way you used to show it back?


#3

I use VueJS to build the interface and I hide the application with remote.app.hide().

In my Vue component, I added a listener on win, win.on('hide', this._reset), so when the BrowserWindow will hide, Vue will restore the current state to the default mode.

I imagine it’s too fast and Vue doesn’t have the time to restore the state to default and do it when the BrowserWindow is visible again. But I’m not sure about this.

EDIT : I created a sample Github project that reproduce the issue. Here the link: https://github.com/Cronos87/electron-vue-flash-issue.

Thank you for any help.