pulsar-edit / pulsar

A Community-led Hyper-Hackable Text Editor
https://pulsar-edit.dev
Other
3.33k stars 140 forks source link

New Windows opens in same workspace #1015

Open croaker000 opened 5 months ago

croaker000 commented 5 months ago

Thanks in advance for your bug report!

What happened?

Ubuntu Linux (v24.04 but likely for previous versions too) Pulsar icon on Gnome Dock offers a "New Window" option to open a new instance of Pulsar. If the user already has an open Pulsar window, moves to a different workspace and opens a new window, Pulsar does this back in the workspace where the original window is located moving the user back to the previous workspace in the process. New window can be moved to desired workspace manually once open.

Pulsar version

1.117

Which OS does this happen on?

🐧 Debian based (Linux Mint, Ubuntu, etc.)

OS details

24.04

Which CPU architecture are you running this on?

x86_64/AMD64

What steps are needed to reproduce this?

Use a vanilla instance of Ubuntu with more than one Gnome workspaces enabled. Follow bug description

Additional Information:

No response

flatmax commented 5 months ago

ping on this

savetheclocktower commented 5 months ago

I don't use different virtual desktops (“spaces” on macOS, etc.) and I don't know what Electron's default behavior is here, but if someone wants to track down how this could be fixed, we'd be willing to help.

I'm unclear on whether there's a distinction between multiple physical displays (i.e., I connect two monitors to my PC) and multiple virtual displays (I set up three spaces on macOS). If they're treated identically on the layer that's available to Electron, then it's at least possible to micromanage the display on which a new window is created. The APIs are a bit awkward, but they're there.

If they're treated differently, then I'm not certain that this is something that an Electron app has control over.

If anyone has experience with this, I'd be interested in hearing it.

savetheclocktower commented 5 months ago

Actually, I think this might be the exact workaround that we need.