зеркало из https://github.com/github/putty.git
Remove an item from gtkapp.c's OS X TODO comment.
The last few changes between them have fixed the problem of windows not closing properly when their sessions terminated. The problem was really more than one problem - pterm session termination wasn't even detected due to the missing SIGCHLD handler, window-closing wasn't done explicitly due to exit_callback() just calling gtk_main_quit instead of a proper gtk_widget_destroy(), and that in turn wouldn't do quite the right thing without the g_application_{hold,release} system which I added in gtkapp.c as part of the non-model config box rework. Now that all of those are fixed, things seem to be working sensibly; the OS X Pterm.app and PuTTY.app, and the ordinary X GTK ptermapp and puttyapp too, now allow windows to be closed independently of each other, close them automatically in the right way, and automatically terminate the whole application when the last window is gone. So I can clean up that TODO item, including its handwavy 'need to work out some kind of mechanism'. Some kind of mechanism has now been worked out, and given that there turned out to be a whole cluster of interacting structural issues, no wonder I wasn't _quite_ sure what it ought to be!
This commit is contained in:
Родитель
817e4ad2dd
Коммит
7891cb1ac1
|
@ -36,21 +36,6 @@ keyboard reflexes expect the Meta key to be in that position; but if
|
|||
you don't turn that option on, then these shortcuts should work as an
|
||||
ordinary Mac user expects, and currently they don't.
|
||||
|
||||
Windows don't close sensibly when their sessions terminate. This is
|
||||
because until now I've relied on calling cleanup_exit() or
|
||||
gtk_main_quit() in gtkwin.c to terminate the program, which is
|
||||
conceptually wrong in this situation (we don't want to quit the whole
|
||||
application when just one window closes) and also doesn't reliably
|
||||
work anyway (GtkApplication doesn't seem to have a gtk_main invocation
|
||||
in it at all, so those calls to gtk_main_quit produce a GTK assertion
|
||||
failure message on standard error). Need to introduce a proper 'clean
|
||||
up this struct gui_data' function (including finalising other stuff
|
||||
dangling off it like the backend), call that, and delete just that one
|
||||
window. (And then work out a replacement mechanism for having the
|
||||
ordinary Unix-style gtkmain.c based programs terminate when their
|
||||
session does.) connection_fatal() in particular should invoke this
|
||||
mechanism, and terminate just the connection that had trouble.
|
||||
|
||||
Mouse wheel events and trackpad scrolling gestures don't work quite
|
||||
right in the terminal drawing area.
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче