Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

synchronize toplevels using wm group not working

35 views
Skip to first unread message

The Rickster

unread,
Jan 16, 2023, 1:12:34 AM1/16/23
to
Am trying to use the 'wm group' command to perform as described in the docs. However, using the following script, I am unable to do so. Additionally, it is hoped that using group would be a way to move a group of toplevels when the leader is moved (yes, bind configure is an option). What am I doing incorrectly - the toplevel .t2 does not deiconify.
---------
set t1 [toplevel .t1 -background yellow -height 200p -width 400p]
set t2 [toplevel .t2 -width 100 -height 72 -background blue ]
wm geometry $t1 +100+100
wm geometry $t2 +150+120
wm group $t2 $t1
puts [wm group $t2]
wm iconify $t1
wm iconify $t2
after 2000
# order of deiconify seems a good way to set order of toplevels
wm deiconify $t1
wm geometry $t1 +400+100

saitology9

unread,
Jan 16, 2023, 11:25:50 AM1/16/23
to
I wasn't familiar with this option. The man page says this:

> The window manager may use this information, for example, to unmap all of the windows
> in a group when the group's leader is iconified.

So it looks like it is up to the window manager whether and/or how to do
use this info. Furthermore, I think this may be related to the MS
Windows setting where similar windows were iconified together to save
space on the taskbar. However, this feature is no longer available in
MS Windows 11.




Ralf Fassel

unread,
Jan 16, 2023, 11:55:11 AM1/16/23
to
* saitology9 <saito...@gmail.com>
> [wm group]
| > The window manager may use this information, for example, to unmap all of the windows
| > in a group when the group's leader is iconified.

Whenever the manpages say "it is up to the window manager" you can
usually forget about that feature to be an important functionality of
your UI. The differences in the various WMs on Linux alone are already
big, and then we haven't talked different OS yet.

But. At least for iconify/deiconify [wm transient] might help the OP,
though it has other drawbacks (window decoration tc).

R'

The Rickster

unread,
Jan 16, 2023, 5:29:22 PM1/16/23
to
thanks, y'all (am from Georgia) for responding so quickly. Those were pretty much my thoughts as well; but, I have been wrong before. Seems bindings of the Configure event is the way to make it happen.
Rick

et4

unread,
Jan 16, 2023, 9:42:31 PM1/16/23
to
For the gang repositioning, I too just use configure binding where [wm geom] and [regex] are you friend:

% set geom [wm geom .] ;# this one was slightly off screen to show negatives
438x200+-197+-25
% regexp {^([0-9]+)x([0-9]+)[+-]([+-]?[0-9]+)[+-]([+-]?[0-9]+)} $geom -> xsiz ysiz xpos ypos
1
% lg
--- -> = |438x200+-197+-25|
--- geom = |438x200+-197+-25|
--- xpos = |-197|
--- xsiz = |438|
--- ypos = |-25|
--- ysiz = |200|
0 new messages