Boscop / web-view

Rust bindings for webview, a tiny cross-platform library to render web-based GUIs for desktop applications
MIT License
1.92k stars 175 forks source link

Show / Hide web-view #186

Open TheKnarf opened 4 years ago

TheKnarf commented 4 years ago

Hi,

I'm trying to implement a spotlight-like application that should popup when needed and then hide itself when done. How do I show/hide the web-view? I'd rather not have to recreate the window and reload the html/js every time, instead I'd like from the Rust code to be able show/hide the window, is this possible?

nampdn commented 4 years ago

I think at this time we can manage to set the window position outside the screen to visually making it hidden. Hopefully there's an API to do this natively.

Blakeinstein commented 4 years ago

I have implemented a function call to minimize the window to tray for gtk and edge in #200 It is currently availabe in my fork, if you are interested.

It should be possible to hide the window to system tray in windows and I am sure winapi has calls for that, but i am unsure if that can be supported for gtk.