replit / desktop

Replit Desktop App
114 stars 3 forks source link

Fix "New Window" menu item on Linux #132

Closed sergeichestakov closed 1 year ago

sergeichestakov commented 1 year ago

Why

The native "new window" menu item is not working as expected in Ubuntu:

Screenshot 2023-09-26 at 12 14 18 PM

Fixes WS-1067

What changed

Fix "New Window" menu item on Linux by handling the corresponding "second-instance" event that gets emitted appropriately. I'm sure there's a "proper" way to do this that I'm not figuring out yet (the docs are really bad around this and can't find anything relevant) such as relaunching the app with the flags they pass in, but this works as expected for now.

For context, this is what the event looks like when it's emitted (we currently ignore because the last param which is supposed to be a URL according to the docs is not a valid URL):

Screenshot 2023-09-26 at 11 57 44 AM

Test plan

Open new window when native "new window" event is received in Ubuntu.

linear[bot] commented 1 year ago
WS-1067 desktop app "new window" doesn't work on ubuntu, can only have 1 window open.

faris said: > desktop app "new window" doesn't work on ubuntu, can only have 1 window open. Started in 1.0.0