! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Mousepad can't run synchronous
Status:
RESOLVED: WONTFIX
Product:
Mousepad
Component:
General

Comments

Description Robert Spanjaard 2015-10-11 16:21:17 CEST
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.
Comment 1 Matthew Brush editbugs 2015-10-11 20:29:37 CEST
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.
Comment 2 Theo Linkspfeifer editbugs 2020-05-22 13:40:04 CEST
Closing as won't fix.

Bug #12252

Reported by:
Robert Spanjaard
Reported on: 2015-10-11
Last modified on: 2020-05-22

People

Assignee:
Matthew Brush
CC List:
1 user

Version

Target Milestone:
Mousepad 0.2.x

Attachments

Additional information