cytoscape / cy-ndex-2

A Cytoscape client app for the NDEx database
MIT License
0 stars 2 forks source link

Electron window disappears behind Cytoscape window #7

Open bdemchak opened 7 years ago

bdemchak commented 7 years ago

It's pretty simple to lose the Electron window by clicking on the Cytoscape window. Unless the user knows to go fishing for the Electron windows. Most users will not know this. Is it possible to keep the Electron window on top of the Cytoscape window?

ericsage commented 7 years ago

@keiono this is an App issue.

keiono commented 7 years ago

I'm working on this now.

keiono commented 7 years ago

Fixed in 2.0.10 tag.

keiono commented 7 years ago

Ready for review in v2.0.11.

bdemchak commented 7 years ago

On Windows 10, if I have Electron window up, but click on the Cytoscape window, the Electron window disappears and the Cytoscape window remains unclickable. I'm forced to kill the Cytoscape task. Problem also occurs if I click the OK button after copying the NDEx ID to the clipboard. Also happens if I take focus to another application. I can get the Electron window back only by moving focus to another application then returning focus to Cytoscape (e.g., via Alt-Tab)

keiono commented 7 years ago

Hiding Electron window is intentional because it is the best way to keep it always on top. But Cytoscape window should be clickable. I don't have Windows machine now, so I'll test at home.

keiono commented 7 years ago

Maybe I need to give up UX for one of the platforms. I'm disabling Window to reject user interaction to emulate modal window, but it also rejects focus, which is a wrong implementation of disabled window, but that how Oracle implements for Windows platform.

Should I give up best UX for Mac? I can easily enable window, but then user can do all kinds of stupid things while opening Electron window.

keiono commented 7 years ago

The simplest, and the most robust way to implement this feature is simply set global alwaysOnTop flag. This guarantees the electron window is always on top, but it is a system-wide property. Is it OK to enable it?

keiono commented 7 years ago

I decide to enable alwaysOnTop flag. It is not a perfect solution, but disabling this flag introduces tons of issues and all of those are very high risk factors like this one.

bdemchak commented 7 years ago

Please check on Linux and Mac