duncs / clusterssh

Cluster SSH - Cluster Admin Via SSH
https://github.com/duncs/clusterssh/wiki
896 stars 79 forks source link

console is always put into top-left corner when using option console_position #100

Closed eserte closed 6 years ago

eserte commented 6 years ago

There's already a bug report at Debian describing the problem: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758215

I tried to debug the problem and found out that this oneliner (which tries to reflect some of cssh's mainwindow operations) also shows the problem (window is positioned at +0+0, not -0-0):

perl -MTk -e '$mw=tkinit;$mw->withdraw;$mw->geometry("-0-0");$mw->update;$mw->withdraw;$mw->deiconify;MainLoop'

Calling $mw->update;$mw->withdraw causes the problem. If either of the two method calls is omitted, then the positioning is as expected.

Probably it's best to not withdraw again if the window is already withdrawn. Something like

if ($mw->state ne "withdrawn") { $mw->withdraw }

would fix this.

duncs commented 6 years ago

Good catch and fix, thanks. Applied to the repo

I was not aware of this Debian bug. I will have a look to see if there are any quick wins when I have to opportunity.