Relm4 icon indicating copy to clipboard operation
Relm4 copied to clipboard

Relm4 should support multiple application instances

Open euclio opened this issue 2 years ago • 3 comments

We currently panic if multiple instances of the same application are started:

https://github.com/Relm4/Relm4/blob/9ad0a5dabae5db0ca88ad7fa791d533c7bd32a2a/relm4/src/app.rs#L87

This is very limiting for certain classes of application (file managers, for instance). We should remove this limitation and handle this case gracefully.

euclio avatar Feb 05 '23 19:02 euclio

It seems like removing the else branch with the panic solves the issue, but it doesn't open a new window. Maybe we should explore more options, but my assumption with that else branch was definitely wrong since GTK re-uses the application when you start an app twice...

AaronErhardt avatar Feb 05 '23 20:02 AaronErhardt

We've addressed the first issue now, but I don't think this is all you need for fm, right? It should be possible to select whether starting a new app instance does nothing (current situation) or opens a new window. I think this has to do with different flags for gio::Application, have you already experimented with this? I think it's already possible to pass a custom application to RelmApp for testing this.

AaronErhardt avatar Feb 06 '23 12:02 AaronErhardt

I'll investigate this soon.

euclio avatar Feb 06 '23 15:02 euclio