When you launch mousepad, it automatically creates a new thread and frees the old one. So on a command line, entering "mousepad" has the same effect as entering "mousepad &". There is no way to keep mousepad on the main thread. This is a problem for other programs launching Mousepad as an external editor, because they rely on the return value of the main thread to see when Mousepad is being closed (and editing has finished). For instance, when I edit a remote file in gFTP, gFTP downloads the file, launches the editor, waits for the return value, checks if the edited file has changed, and if neccessary uploads the file to replace the original version with the edited version. But since Mousepad immediately returns a zero (and then launches on a separate thread), gFTP 'thinks' the editor has finished, doesn't see any changes in the file, and doesn't upload any changes. Mousepad should only launch 'in the background' when I tell it to do so, not by default.
This is because it tries to keep all of the windows in one instance/process when using the `--enable-dbus` configure option. If you want to force a new process, you can pass the `--disable-server` option to the second and later Mousepad instances to disable this behaviour.
Closing as won't fix.