diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-11-26 21:51:45 +0000 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2022-11-26 21:51:45 +0000 |
commit | 02e5a6a3bb6cdeb5f16f2dd3a3cb6353b06aaaa8 (patch) | |
tree | 5c4a0681542bad941252ac928ba56f3e28f07072 | |
parent | 8601ff254cd74b6a1c16e325719b8bd24894afa4 (diff) | |
download | draklive-install-02e5a6a3bb6cdeb5f16f2dd3a3cb6353b06aaaa8.tar draklive-install-02e5a6a3bb6cdeb5f16f2dd3a3cb6353b06aaaa8.tar.gz draklive-install-02e5a6a3bb6cdeb5f16f2dd3a3cb6353b06aaaa8.tar.bz2 draklive-install-02e5a6a3bb6cdeb5f16f2dd3a3cb6353b06aaaa8.tar.xz draklive-install-02e5a6a3bb6cdeb5f16f2dd3a3cb6353b06aaaa8.zip |
Install callback routine whilst waiting for sub-programs to terminate.
This allows us to respond to window events and check-alive pings (mga#31105)
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | draklive-install | 15 |
2 files changed, 18 insertions, 0 deletions
@@ -1,3 +1,6 @@ +- install callback routine to handle window events whilst waiting + for sub-programs to terminate (mga#31105) + 2.30 - on systems with low RAM, remove unwanted packages after install (mga#27872) diff --git a/draklive-install b/draklive-install index c084713..3b8224c 100755 --- a/draklive-install +++ b/draklive-install @@ -37,6 +37,21 @@ my $logfile = '/tmp/draklive-install.log'; } } +my $child_pid; +END { + run_program::terminate($child_pid) if $child_pid; +} + +sub wait_loop_callback { + my ($pid) = @_; + $child_pid = $pid; + while (Gtk3::events_pending()) { + Gtk3::main_iteration(); + } + $child_pid = undef; +} +run_program::set_wait_loop_callback(\&wait_loop_callback, 50); + ($::rootwidth, $::rootheight) = (Gtk3::Gdk::Screen::width, Gtk3::Gdk::Screen::height); $::real_windowwidth = $::rootwidth > 800 ? 750 : 600; $::real_windowheight = $::rootheight > 600 ? 500 : 400; |