use strict; use warnings; use X11::GUITest ':ALL'; my $cur = GetInputFocus; sub onscreen { my ($x, $y) = @_; return 0 if $x > 1280 or $x < 0; return 0 if $y > 1024 or $y < 0; return 1; } for(;;) { my $root = GetRootWindow; for my $window (grep {defined $_->{n}} map {{id=>$_, n=>GetWindowN +ame($_)}} GetChildWindows($root)) { if( $window->{n} =~ m/Room List/ ) { my ($x, $y, $w, $h) = GetWindowPos($window->{id}); # warn +"\$x=$x, \$y=$y, \$w=$w, \$h=$h"; my ($ex, $ey, $ew, $eh) = (1, 19, 1076, 879); if( onscreen($x, $y) ) { unless( $x == $ex and $y == $ey ) { print "Moving room list to ${ex}x$ey\n"; MoveWindow($window->{id}, $ex, $ey); } unless( $w == $ew and $h == $eh ) { print "Resizing room list to ${ew}x$eh\n"; ResizeWindow($window->{id}, $ew, $eh); } } } } sleep $d; }
Also, I may not understand Gnome/kde vs Metacity/sawfish/openbox -- but I don't think Gnome moves windows around, that's metacity. Metacity doesn't handle the panels, that's gnome... maybe I'm way off.
-Paul
In reply to Re: Moving and resizing application in X Window Manager
by jettero
in thread Moving and resizing application in X Window Manager
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |