Skip to content

Commit

Permalink
🐛 Do not center main window when opening a new terminal (#768)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfrenoy committed Feb 16, 2021
1 parent a791e3b commit 08f8457
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/PACMain.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3994,17 +3994,19 @@ sub _delNodes {

sub _showConnectionsList {
my $self = shift;
my $move = shift // 1;
my $force = shift // 1;

# Force hidden state so that the show operation is properly handled
# (otherwise the window may remain in the 'scratchpad' / 'withdrawn' state, as with i3wm)
$$self{_GUI}{main}->hide();
if ($force) {
# Force hidden state so that the show operation is properly handled
# (otherwise the window may remain in the 'scratchpad' / 'withdrawn' state, as with i3wm)
$$self{_GUI}{main}->hide();
$$self{_GUI}{main}->show();
}

# Do show the main window
$$self{_GUI}{main}->show();
$$self{_GUI}{main}->present();

if ($move) {
if ($force) {
$$self{_GUI}{main}->move($$self{_GUI}{posx} // 0, $$self{_GUI}{posy} // 0);
}
}
Expand Down

0 comments on commit 08f8457

Please sign in to comment.