helloSystem / Filer

A file manager that can also render the desktop
GNU General Public License v2.0
30 stars 9 forks source link

In Spatial mode, never open <2> windows #136

Open probonopd opened 2 years ago

probonopd commented 2 years ago

In Spatial mode, we sould never open windows that will have <2> in their title. Sometimes this still happens currently. Possibly we need to rework the whole code that determines which windows are already open, as it can lead to folders that cannot be opened (e.g., when one deletes and recreates folders on the command line, or when one tries to open the same zip file twice by double-clicking).

probonopd commented 1 year ago

Since we are not using Tabs anyways, we could write the path of the Filer window into a X11 atom. Then, whenever Filer is about to open a window, we could check for existing Filer windows with the same atom. If one exists, bring it to the front.

We already have very similar code in the Windows menu in Menu. So should not be too hard. And would be in accordance with our philosophy that data concerning objects should stored on the objects themselves (here: windows), not somewhere else. Doing this leads to simpler and more robust software.