Fedora 25 + GNOME 3.22 + Kernel 4.10-rc3
Steps to reproduce:
Without this extension, the second document opens in the existing Gedit window.
With this extension, the second document opens in a new Gedit window.
There's already a separate GNOME extension that produces "new instance" behavior, so there's no need to re-implement it in this one, if that's what's going on here.
Hmm I'm not observing this.. The only time this should happen is if you have isolate workspaces on and you are in a different workspace (virtual desktop) than the existing running instance.
I don't have "Isolate workspaces" on and Gedit isn't running in a separate workspace. Here's a screen recording illustrating the issue that hopefully proves I'm not mad.
http://hommelscitadel.com/wp-content/uploads/2017/01/dash-to-panel_gedit_issue.webm
Still happening FYI.
Ok I did quite a bit of digging but I'm out of time to go further right now. This seemed intermittent at first but then I realized this only happens when the top of the window is very near the top of the monitor.
What I found out so far is that gedit always opens a new instance if the current running instance is in a sticky state. That's just standard behavior for gedit and it doesn't matter if this extension is used or not. If you use another text editor such as geany, this doesn't happen.
But beyond that, with this extension installed and the panel in the bottom position, if you move the title bar of the window very near the top of the screen without actually making it sticky, it thinks it is sticky for some reason. The thing is, without this extension you can't move the window that far up because the panel is in the way. This happens whether you use this extension or Bottom Panel or Hide Top Bar or anything that let's you access that area that's normally blocked by the top bar.
I found the code in mutter (the window manager) where it allows a window to be marked as sticky but I'm not really sure what is setting it as such yet. If the code's in mutter it's probably not going to be able to be changed, but if gnome shell is sending some margin to account for the panel to mutter then maybe I can tweak that.
Wow, you're right! Excellent sleuthing. If it's a mutter bug, then it's probably worth filing a bugzilla ticket at least.
Hello, I can't reproduce this with the latest version, closing for now.
Most helpful comment
Ok I did quite a bit of digging but I'm out of time to go further right now. This seemed intermittent at first but then I realized this only happens when the top of the window is very near the top of the monitor.
What I found out so far is that gedit always opens a new instance if the current running instance is in a sticky state. That's just standard behavior for gedit and it doesn't matter if this extension is used or not. If you use another text editor such as geany, this doesn't happen.
But beyond that, with this extension installed and the panel in the bottom position, if you move the title bar of the window very near the top of the screen without actually making it sticky, it thinks it is sticky for some reason. The thing is, without this extension you can't move the window that far up because the panel is in the way. This happens whether you use this extension or Bottom Panel or Hide Top Bar or anything that let's you access that area that's normally blocked by the top bar.
I found the code in mutter (the window manager) where it allows a window to be marked as sticky but I'm not really sure what is setting it as such yet. If the code's in mutter it's probably not going to be able to be changed, but if gnome shell is sending some margin to account for the panel to mutter then maybe I can tweak that.