Object configured console window position

The console position is always put at the top left corner rather than
the configured position due to the combination of:

    `$mw->update;$mw->withdraw`

Only withdraw the window if it is not already withdrawn.

Thanks to eserte for the fix.

Github issue #100
This commit is contained in:
Duncan Ferguson 2017-12-24 12:09:40 +00:00
parent 4a72b1cab3
commit c50b6fff14
2 changed files with 4 additions and 3 deletions

View file

@ -1,5 +1,6 @@
4.12_01 0000-00-00 Duncan Ferguson <duncan_ferguson@user.sf.net>
4.13 0000-00-00 Duncan Ferguson <duncan_ferguson@user.sf.net>
- Ensure ssh_args is keep unset if it is emptied in the configuration file
- Obey configured console position (Debian bug 758215) (Github issue #100)
4.12 2017-12-23 Duncan Ferguson <duncan_ferguson@user.sf.net>
- Fix 'undefined value' error

View file

@ -3,7 +3,7 @@ package App::ClusterSSH;
use 5.008.004;
use warnings;
use strict;
use version; our $VERSION = version->new('4.12_01');
use version; our $VERSION = version->new('4.13');
use Carp qw/cluck :DEFAULT/;
@ -878,7 +878,7 @@ sub show_console() {
$windows{main_window}->update();
select( undef, undef, undef, 0.2 ); #sleep for a mo
$windows{main_window}->withdraw;
$windows{main_window}->withdraw if $windows{main_window}->state ne "withdrawn";
# Sleep for a moment to give WM time to bring console back
select( undef, undef, undef, 0.5 );