From 18a0543d0a5959c50c4b30f8aed5387465fbaa8a Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Fri, 15 Oct 2021 04:52:24 +0300 Subject: Gtk: disabled ^Z suspension on Unix for the time being * This has always been broken as Gtk will not hide the window before suspending. * It has been deemed to complicated to implement at the moment. Even if we can catch SIGTSTP (not that trivial), it seems to be impossible - at least without some lower level Xlib interaction - to hide the program window before raising SIGTSTP. * Even if everything worked, it is unclear whether it is actually desirable to suspend a GUI application - ^Z may be pressed accidentally and it will be inconvenient to resume the job. So we would additionally have to check for the existence of an attached console. --- src/interface-gtk/interface.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/interface-gtk/interface.c') diff --git a/src/interface-gtk/interface.c b/src/interface-gtk/interface.c index 154c950..104bb89 100644 --- a/src/interface-gtk/interface.c +++ b/src/interface-gtk/interface.c @@ -1052,15 +1052,6 @@ teco_interface_event_loop(GError **error) * closing the window if supported by this version of glib. * Note that this replaces SciTECO's default SIGTERM handler * so it will additionally raise(SIGINT). - * - * FIXME: On ^Z, we do not suspend properly. The window is still shown. - * Perhaps we should try to catch SIGTSTP? - * This does not work with g_unix_signal_add(), though, so any - * workaround would be tricky. - * We could create a pipe via g_unix_open_pipe() which we - * write to using write() in a normal signal handler. - * We can then add a watcher using g_unix_fd_add() which will - * hide the main window. */ #ifdef G_OS_UNIX g_unix_signal_add(SIGTERM, teco_interface_sigterm_handler, NULL); -- cgit v1.2.3