diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2016-06-24 11:42:31 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2016-06-24 11:42:31 +0000 |
commit | 0afe44114802de6a2b8318968d890bd884d5d631 (patch) | |
tree | 208705ca606a83ec28e5bc4fbb0d1ad8c3f78406 /usr.sbin/pkg_add/OpenBSD/State.pm | |
parent | c8d547acad970019134eb8e90077d7fd2dc5eda1 (diff) |
simplify the logic. no need for a separate hook when we can just specialize
find_window_size.
fix a bug: integrate SIG{CONT} for re-checking window size.
the way it's currently written, first call to compute_playfield will
call itself once. But it makes for less code.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/State.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/State.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 56080e9a4f5..0e171b721d1 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.36 2016/06/23 16:11:23 espie Exp $ +# $OpenBSD: State.pm,v 1.37 2016/06/24 11:42:30 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie <espie@openbsd.org> # @@ -394,13 +394,11 @@ sub find_window_size $self->{height} = $l[1]; $SIG{'WINCH'} = sub { $self->find_window_size; - $self->window_size_changed; }; } -} - -sub window_size_changed -{ + $SIG{'CONT'} = sub { + $self->find_window_size(1); + } } OpenBSD::Auto::cache(signer_list, |