nfd-rs icon indicating copy to clipboard operation
nfd-rs copied to clipboard

Force window to be in the foreground

Open woelper opened this issue 7 years ago • 2 comments

Sorry for this potentially stupid issue but I have a very obscure use case where I trigger this very nice library from an electron app that communicates with a rust backend via rest/rocket. However the native file browser always opens in the background, making it hard or impossible to see. Is there a way to bring it to focus automatically?

woelper avatar Apr 09 '19 15:04 woelper

Numerous commits are in the upstream nativefiledialog project devel branch as of today that have improved focus issues on MacOS and X/Linux/GTK targets.

mlabbe avatar Jan 09 '21 19:01 mlabbe

It's still possible to get the file picker in the background. This is serious for full-screen games with a modal dialog. The user is stuck with a dead keyboard and mouse. CTL-ALT-DEL, or, if the window has a title bar, minimizing it, will expose the file picker, but that's about it.

Demo: https://github.com/John-Nagle/ui-mock Look in the "development" menu for an open file menu option.

John-Nagle avatar Jun 26 '22 17:06 John-Nagle