• synchronize toplevels using wm group not working

    From The Rickster@21:1/5 to All on Sun Jan 15 22:12:32 2023
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From saitology9@21:1/5 to The Rickster on Mon Jan 16 11:25:41 2023
    On 1/16/2023 1:12 AM, The Rickster wrote:
    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

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ralf Fassel@21:1/5 to All on Mon Jan 16 17:55:06 2023
    * saitology9 <saitology9@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'

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From The Rickster@21:1/5 to Ralf Fassel on Mon Jan 16 14:29:20 2023
    On Monday, January 16, 2023 at 8:55:11 AM UTC-8, Ralf Fassel wrote:
    * 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'
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From et4@21:1/5 to The Rickster on Mon Jan 16 18:42:26 2023
    On 1/16/2023 2:29 PM, The Rickster wrote:
    On Monday, January 16, 2023 at 8:55:11 AM UTC-8, Ralf Fassel wrote:
    * 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'
    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

    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|

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)