bbidulock / icewm

A window manager designed for speed, usability, and consistency
Other
590 stars 100 forks source link

changing layer ontop to normal doesn't affect immediately without focusing #629

Closed zaza42 closed 2 years ago

zaza42 commented 2 years ago

I don't know if it's a bug or a feature request…

When i'm changing an unfocused window from layer ontop to normal, IceWM doesn't rearrange all windows without focusing. But it affects to ontop layered windows immediately (gkrellm in this situation).

The video can explain better than me:

https://user-images.githubusercontent.com/16356124/146515329-b0b99d0b-4fb3-4728-9b5b-ad93dfbbe6e5.mp4

chromium is on normal, gkrellm is ontop, mpv is ontop while playing and goes to normal when paused. I use a little lua script for it:

mp.observe_property("pause", "bool", function(name, value)
    local ontop = mp.get_property_native("ontop")
    if value then
        if ontop then
            mp.set_property_native("ontop", false)
        end
    else
        if not ontop and not mp.get_property_native("fullscreen") then
            mp.set_property_native("ontop", true)
        end
    end
end)

Then I made a quickhack workaround by adding one more line after ontop false: os.execute("orgwid=$(icesh -f id); icesh -p $PPID setLayer normal activate; icesh -w $orgwid activate")

https://user-images.githubusercontent.com/16356124/146515518-83ac99f4-d519-4026-b562-b8f04ce3a26d.mp4

…and after changing the layer IceWM puts the active focused chromium above the paused mpv instantly.

So what is the logic behind this behaviour? I can live with it just asking. ;->

gijsbers commented 2 years ago

What is much better is to use a single icesh spy on the three windows.

rubyFeedback commented 2 years ago

Not related to the issue itself, but I get a "Video can't be played because the file is corrupt." here on firefox. Not sure if it works for you chrome-folks, so ... I am the waning minority ... :D (youtube videos tend to work very well though, so perhaps this is related to either github and/or the video file itself)

zaza42 commented 2 years ago

icesh spy on mpv:

36:45.105: 0x5c00002: Leave Normal Nonlinear Nofocus
36:47.313: 0x5c00002: Enter Normal Nonlinear Nofocus
36:48.451: 0x5c00002: _WIN_LAYER = 6
36:48.453: 0x5c00002: Visibility Unobscured 
36:48.453: 0x5c00002: _NET_WM_STATE = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
36:50.888: 0x5c00002: WM_NAME = 4% / 00:04:34 - wordup.mp4
36:50.891: 0x5c00002: WM_ICON_NAME = 4% / 00:04:34 - wordup.mp4
36:50.891: 0x5c00002: _NET_WM_NAME = 4% / 00:04:34 - wordup.mp4
36:50.891: 0x5c00002: _NET_WM_ICON_NAME = 4% / 00:04:34 - wordup.mp4
36:50.891: 0x5c00002: _NET_WM_VISIBLE_NAME = 4% / 00:04:34 - wordup.mp4
36:50.891: 0x5c00002: _NET_WM_VISIBLE_ICON_NAME = 4% / 00:04:34 - wordup.mp4
36:53.606: 0x5c00002: WM_NAME = 5% / 00:04:34 - wordup.mp4
36:53.608: 0x5c00002: WM_ICON_NAME = 5% / 00:04:34 - wordup.mp4
36:53.608: 0x5c00002: _NET_WM_NAME = 5% / 00:04:34 - wordup.mp4
36:53.608: 0x5c00002: _NET_WM_ICON_NAME = 5% / 00:04:34 - wordup.mp4
36:53.609: 0x5c00002: _NET_WM_VISIBLE_NAME = 5% / 00:04:34 - wordup.mp4
36:53.609: 0x5c00002: _NET_WM_VISIBLE_ICON_NAME = 5% / 00:04:34 - wordup.mp4
36:56.369: 0x5c00002: WM_NAME = 6% / 00:04:34 - wordup.mp4
36:56.371: 0x5c00002: WM_ICON_NAME = 6% / 00:04:34 - wordup.mp4
36:56.371: 0x5c00002: _NET_WM_NAME = 6% / 00:04:34 - wordup.mp4
36:56.371: 0x5c00002: _NET_WM_ICON_NAME = 6% / 00:04:34 - wordup.mp4
36:56.371: 0x5c00002: _NET_WM_VISIBLE_NAME = 6% / 00:04:34 - wordup.mp4
36:56.371: 0x5c00002: _NET_WM_VISIBLE_ICON_NAME = 6% / 00:04:34 - wordup.mp4
36:58.446: 0x5c00002: _WIN_LAYER = 4
36:58.447: 0x5c00002: Visibility PartiallyObscured 
36:58.447: 0x5c00002: _NET_WM_STATE = _NET_WM_STATE_STICKY
37:05.451: 0x5c00002: _WIN_LAYER = 6
37:05.453: 0x5c00002: Visibility Unobscured 
37:05.453: 0x5c00002: _NET_WM_STATE = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
37:06.171: 0x5c00002: WM_NAME = 7% / 00:04:34 - wordup.mp4
37:06.173: 0x5c00002: WM_ICON_NAME = 7% / 00:04:34 - wordup.mp4
37:06.173: 0x5c00002: _NET_WM_NAME = 7% / 00:04:34 - wordup.mp4
37:06.174: 0x5c00002: _NET_WM_ICON_NAME = 7% / 00:04:34 - wordup.mp4
37:06.174: 0x5c00002: _NET_WM_VISIBLE_NAME = 7% / 00:04:34 - wordup.mp4
37:06.174: 0x5c00002: _NET_WM_VISIBLE_ICON_NAME = 7% / 00:04:34 - wordup.mp4
37:08.895: 0x5c00002: WM_NAME = 8% / 00:04:34 - wordup.mp4
37:08.900: 0x5c00002: WM_ICON_NAME = 8% / 00:04:34 - wordup.mp4
37:08.900: 0x5c00002: _NET_WM_NAME = 8% / 00:04:34 - wordup.mp4
37:08.900: 0x5c00002: _NET_WM_ICON_NAME = 8% / 00:04:34 - wordup.mp4
37:08.900: 0x5c00002: _NET_WM_VISIBLE_NAME = 8% / 00:04:34 - wordup.mp4
37:08.900: 0x5c00002: _NET_WM_VISIBLE_ICON_NAME = 8% / 00:04:34 - wordup.mp4
37:11.651: 0x5c00002: WM_NAME = 9% / 00:04:34 - wordup.mp4
37:11.654: 0x5c00002: WM_ICON_NAME = 9% / 00:04:34 - wordup.mp4
37:11.654: 0x5c00002: _NET_WM_NAME = 9% / 00:04:34 - wordup.mp4
37:11.654: 0x5c00002: _NET_WM_ICON_NAME = 9% / 00:04:34 - wordup.mp4
37:11.654: 0x5c00002: _NET_WM_VISIBLE_NAME = 9% / 00:04:34 - wordup.mp4
37:11.654: 0x5c00002: _NET_WM_VISIBLE_ICON_NAME = 9% / 00:04:34 - wordup.mp4
37:14.373: 0x5c00002: WM_NAME = 10% / 00:04:34 - wordup.mp4
37:14.377: 0x5c00002: WM_ICON_NAME = 10% / 00:04:34 - wordup.mp4
37:14.377: 0x5c00002: _NET_WM_NAME = 10% / 00:04:34 - wordup.mp4
37:14.377: 0x5c00002: _NET_WM_ICON_NAME = 10% / 00:04:34 - wordup.mp4
37:14.377: 0x5c00002: _NET_WM_VISIBLE_NAME = 10% / 00:04:34 - wordup.mp4
37:14.377: 0x5c00002: _NET_WM_VISIBLE_ICON_NAME = 10% / 00:04:34 - wordup.mp4
37:16.773: 0x5c00002: _WIN_LAYER = 4
37:16.774: 0x5c00002: Visibility PartiallyObscured 
37:16.774: 0x5c00002: _NET_WM_STATE = _NET_WM_STATE_STICKY
37:20.073: 0x5c00002: Leave Normal Nonlinear Nofocus

icesh spy on gkrellm:

36:28.741: 0x1400003: Visibility PartiallyObscured 
36:28.937: 0x1400003: Visibility Unobscured 
36:28.961: 0x1400003: Leave Normal Ancestor Nofocus
36:48.452: 0x1400003: Visibility PartiallyObscured 
36:58.446: 0x1400003: Visibility Unobscured 
37:05.452: 0x1400003: Visibility PartiallyObscured 
37:16.773: 0x1400003: Visibility Unobscured 

icesh spy on chromium:

36:21.849: 0x4c00005: Leave Normal NonlinearVirtual Nofocus
36:28.977: 0x4c00005: Enter Normal Virtual Nofocus
36:29.033: 0x4c00005: Leave Normal NonlinearVirtual Nofocus
36:29.138: 0x4c00005: Enter Normal NonlinearVirtual Nofocus
36:29.201: 0x4c00005: Leave Normal NonlinearVirtual Nofocus
36:45.145: 0x4c00005: Enter Normal NonlinearVirtual Nofocus
36:46.113: 0x4c00005: Leave Grab Virtual Nofocus
36:46.114: 0x4c00005: Enter Ungrab Virtual Nofocus
36:46.114: 0x4c00005: Enter Grab Inferior Nofocus
36:46.115: 0x4c00005: _NET_WM_STATE = _NET_WM_STATE_FOCUSED
36:46.117: 0x4c00005: Focus Normal Nonlinear
36:46.233: 0x4c00005: Leave Ungrab Inferior Focus
36:47.185: 0x4c00005: Leave Normal Virtual Focus
37:20.490: 0x4c00005: _NET_WM_STATE = 
37:20.493: 0x4c00005: Defocus Normal Nonlinear
37:30.809: 0x4c00005: Enter Normal NonlinearVirtual Nofocus
37:31.169: 0x4c00005: Leave Normal NonlinearVirtual Nofocus
gijsbers commented 2 years ago

Here the only focusing is for chromium? Or that is what you do explicitly to have it rearrange?

Can you add lower and try:

icesh -p $PPID setLayer normal lower activate

You can also run the spy in a single command like this:

icesh +c chromium +c gkrellm +c mpv list spy

Which has the advantage that all events are sorted by time in one sequence.

zaza42 commented 2 years ago

Yes, the focus was on chromium all along.

icesh +c chromium +c gkrellm +c mpv list spy is waiting for a click, then: icesh: Unknown action: `+c'

The manual says +C, +Class, so... icesh: Unknown action: `chromium'

gijsbers commented 2 years ago

Ah, OK, then either use +w WINDOWID, or maybe simply -W this like in:

icesh -W this +r list spy

If the current workspace has your apps of interest.

Does the lower help?

I tried to reproduce your scenario, but it works fine for me.

zaza42 commented 2 years ago

Here is the log of icesh -W this +r list spy:

0x1400003  -1 25573 "gkrellm"           : (gkrellm.Gkrellm)    81x794+1505+10
0x1000025  -1 25563 "sh"                : (fsuspend.urxvtc.URxvt) 478x125+853+750
0x1000042  -1 25563 "sh"                : (fsuspend.urxvtc.URxvt) 269x74+1331+801
0x3e00002  -1     0 "GLava"             : (GLava.GLava)        340x70+513+805
0x1000075   3 25563 "DC-1@tecra:/home/DC-1  - load: 0.57": (urxvt.URxvt)        484x329+2+19
0x4800005   3 26210 "changing layer ontop to normal doesn't affect imme": (chromium.Chromium)  1485x867-5-16
0x4800009   3 26210 "Subtitles CatDog: The Great Parent Mystery - subti": (chromium.Chromium)  1485x867-5-16
0x1000083   3 25563 "DC-1@tecra:/home/DC-1/txt/bug/icewm-2.9.x-ontop  -": (urxvt.URxvt)        484x329+275+544
0x1000091   3 25563 "DC-1@tecra:/home/DC-1  - load: 0.77": (urxvt.URxvt)        484x329+1006+179
0x5e00002  -1 26989 "5% / 00:03:27 - This guy spent over 2 years buildi": (gl.mpv)             640x640+958+233
0x136       0     0 ""                  : ()                   1600x900+0+0
26:24.763: 0x5e00002: WM_NAME = 6% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:24.767: 0x5e00002: WM_ICON_NAME = 6% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:24.767: 0x5e00002: _NET_WM_NAME = 6% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:24.767: 0x5e00002: _NET_WM_ICON_NAME = 6% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:24.767: 0x5e00002: _NET_WM_VISIBLE_NAME = 6% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:24.767: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 6% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:25.258: 0x1000083: Leave Normal NonlinearVirtual Focus
26:25.266: 0x4800005: Enter Normal NonlinearVirtual Nofocus
26:26.194: 0x4800005: Leave Grab Virtual Nofocus
26:26.194: 0x4800005: Enter Ungrab Virtual Nofocus
26:26.194: 0x4800005: Enter Grab Inferior Nofocus
26:26.195: 0x1000083: _NET_WM_STATE = 
26:26.200: 0x4800005: _NET_WM_STATE = _NET_WM_STATE_FOCUSED
26:26.200: 0x0000136: _NET_ACTIVE_WINDOW = 0x4800005
26:26.201: 0x0000136: _NET_CLIENT_LIST_STACKING = 0x1000025, 0x1000042, 0x3e00002, 0x1000075, 0x1000009, 0x2800005, 0x420001d, 0x4200045, 0x4800009, 0x1000091, 0x1000083, 0x4800005, 0x1400003, 0x5e00002
26:26.201: 0x1000083: Defocus Normal Nonlinear
26:26.201: 0x4800005: Focus Normal Nonlinear
26:26.201: 0x0000136: Configure 0xe00363 1485x867+-5+-16 Override Above=0xe003bc
26:26.201: 0x1000083: Visibility PartiallyObscured 
26:26.201: 0x4800005: Send ClientMessage _NET_ACTIVE_WINDOW 32 data=1,0x14081d2c,0x0
26:26.201: 0x0000136: _NET_CLIENT_LIST_STACKING = 0x1000025, 0x1000042, 0x3e00002, 0x1000075, 0x1000009, 0x2800005, 0x420001d, 0x4200045, 0x4800009, 0x1000091, 0x1000083, 0x4800005, 0x1400003, 0x5e00002
26:26.290: 0x4800005: Leave Ungrab Inferior Focus
26:26.738: 0x4800005: Leave Normal NonlinearVirtual Focus
26:26.738: 0x5e00002: Enter Normal Nonlinear Nofocus
26:26.865: 0x5e00002: WM_NAME = 7% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:26.869: 0x5e00002: WM_ICON_NAME = 7% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:26.869: 0x5e00002: _NET_WM_NAME = 7% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:26.869: 0x5e00002: _NET_WM_ICON_NAME = 7% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:26.869: 0x5e00002: _NET_WM_VISIBLE_NAME = 7% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:26.869: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 7% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:27.797: 0x5e00002: Send ClientMessage _NET_WM_STATE 32 data=REMOVE,_NET_WM_STATE_ABOVE,
26:27.797: 0x5e00002: _WIN_LAYER = 4
26:27.798: 0x0000136: Configure 0xe001fb 81x794+1505+10 Override Above=0xe0082b
26:27.798: 0x1400003: Visibility Unobscured 
26:27.798: 0x5e00002: Visibility PartiallyObscured 
26:27.798: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_STICKY
26:35.537: 0x5e00002: Send ClientMessage _NET_WM_STATE 32 data=ADD,_NET_WM_STATE_ABOVE,
26:35.537: 0x5e00002: _WIN_LAYER = 6
26:35.538: 0x0000136: Configure 0xe0082b 644x661+956+214 Override Above=0xe001fb
26:35.538: 0x5e00002: Visibility Unobscured 
26:35.538: 0x1400003: Visibility PartiallyObscured 
26:35.538: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
26:36.699: 0x5e00002: WM_NAME = 8% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:36.699: 0x5e00002: WM_ICON_NAME = 8% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:36.702: 0x5e00002: _NET_WM_NAME = 8% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:36.702: 0x5e00002: _NET_WM_ICON_NAME = 8% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:36.702: 0x5e00002: _NET_WM_VISIBLE_NAME = 8% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:36.702: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 8% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:38.766: 0x5e00002: WM_NAME = 9% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:38.766: 0x5e00002: WM_ICON_NAME = 9% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:38.768: 0x5e00002: _NET_WM_NAME = 9% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:38.768: 0x5e00002: _NET_WM_ICON_NAME = 9% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:38.769: 0x5e00002: _NET_WM_VISIBLE_NAME = 9% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:38.769: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 9% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:40.868: 0x5e00002: WM_NAME = 10% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:40.868: 0x5e00002: WM_ICON_NAME = 10% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:40.870: 0x5e00002: _NET_WM_NAME = 10% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:40.870: 0x5e00002: _NET_WM_ICON_NAME = 10% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:40.871: 0x5e00002: _NET_WM_VISIBLE_NAME = 10% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:40.871: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 10% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:41.202: 0x5e00002: Leave Normal Nonlinear Nofocus
26:41.218: 0x4800005: Enter Normal NonlinearVirtual Focus
26:42.394: 0x4800005: Leave Normal NonlinearVirtual Focus
26:42.434: 0x5e00002: Enter Normal Nonlinear Nofocus
26:42.939: 0x5e00002: WM_NAME = 11% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:42.939: 0x5e00002: WM_ICON_NAME = 11% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:42.939: 0x5e00002: _NET_WM_NAME = 11% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:42.939: 0x5e00002: _NET_WM_ICON_NAME = 11% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:42.942: 0x5e00002: _NET_WM_VISIBLE_NAME = 11% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:42.943: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 11% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:43.337: 0x5e00002: Send ClientMessage _NET_WM_STATE 32 data=REMOVE,_NET_WM_STATE_ABOVE,
26:43.337: 0x5e00002: _WIN_LAYER = 4
26:43.337: 0x0000136: Configure 0xe001fb 81x794+1505+10 Override Above=0xe0082b
26:43.337: 0x1400003: Visibility Unobscured 
26:43.337: 0x5e00002: Visibility PartiallyObscured 
26:43.337: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_STICKY
26:43.714: 0x5e00002: Leave Normal Nonlinear Nofocus
26:43.770: 0x4800005: Enter Normal NonlinearVirtual Focus
26:44.554: 0x4800005: Leave Grab Virtual Focus
26:44.554: 0x4800005: Enter Ungrab Virtual Focus
26:44.554: 0x4800005: Enter Grab Inferior Focus
26:44.554: 0x0000136: Configure 0xe00363 1485x867+-5+-16 Override Above=0xe0082b
26:44.555: 0x4800005: _NET_WM_USER_TIME = 336094436
26:44.666: 0x4800005: Leave Ungrab Inferior Focus
26:45.338: 0x4800005: Leave Normal NonlinearVirtual Focus
26:45.338: 0x5e00002: Enter Normal Nonlinear Nofocus
26:46.490: 0x5e00002: Leave Grab Ancestor Nofocus
26:46.490: 0x5e00002: Enter Ungrab Ancestor Nofocus
26:46.490: 0x4800005: _NET_WM_STATE = 
26:46.492: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_FOCUSED, _NET_WM_STATE_STICKY
26:46.492: 0x0000136: _NET_ACTIVE_WINDOW = 0x5e00002
26:46.492: 0x0000136: _NET_CLIENT_LIST_STACKING = 0x1000025, 0x1000042, 0x3e00002, 0x1000075, 0x1000009, 0x2800005, 0x420001d, 0x4200045, 0x4800009, 0x1000091, 0x1000083, 0x5e00002, 0x4800005, 0x1400003
26:46.492: 0x4800005: Defocus Normal Nonlinear
26:46.492: 0x5e00002: Focus Normal Nonlinear
26:46.492: 0x0000136: Configure 0xe0082b 644x661+956+214 Override Above=0xe00363
26:46.930: 0x5e00002: Leave Normal Nonlinear Focus
26:46.962: 0x4800005: Enter Normal NonlinearVirtual Nofocus
26:47.602: 0x4800005: Leave Grab Virtual Nofocus
26:47.602: 0x4800005: Enter Ungrab Virtual Nofocus
26:47.602: 0x4800005: Enter Grab Inferior Nofocus
26:47.602: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_STICKY
26:47.604: 0x4800005: _NET_WM_STATE = _NET_WM_STATE_FOCUSED
26:47.605: 0x0000136: _NET_ACTIVE_WINDOW = 0x4800005
26:47.606: 0x0000136: _NET_CLIENT_LIST_STACKING = 0x1000025, 0x1000042, 0x3e00002, 0x1000075, 0x1000009, 0x2800005, 0x420001d, 0x4200045, 0x4800009, 0x1000091, 0x1000083, 0x4800005, 0x5e00002, 0x1400003
26:47.606: 0x5e00002: Defocus Normal Nonlinear
26:47.606: 0x4800005: Focus Normal Nonlinear
26:47.606: 0x0000136: Configure 0xe00363 1485x867+-5+-16 Override Above=0xe0082b
26:47.698: 0x4800005: Leave Ungrab Inferior Focus
26:48.402: 0x4800005: Leave Normal NonlinearVirtual Focus
26:48.402: 0x5e00002: Enter Normal Nonlinear Nofocus
26:48.886: 0x5e00002: Send ClientMessage _NET_WM_STATE 32 data=ADD,_NET_WM_STATE_ABOVE,
26:48.886: 0x5e00002: _WIN_LAYER = 6
26:48.887: 0x0000136: Configure 0xe0082b 644x661+956+214 Override Above=0xe001fb
26:48.887: 0x5e00002: Visibility Unobscured 
26:48.887: 0x1400003: Visibility PartiallyObscured 
26:48.887: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_STICKY, _NET_WM_STATE_ABOVE
26:50.588: 0x5e00002: WM_NAME = 12% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:50.589: 0x5e00002: WM_ICON_NAME = 12% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:50.590: 0x5e00002: _NET_WM_NAME = 12% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:50.590: 0x5e00002: _NET_WM_ICON_NAME = 12% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:50.591: 0x5e00002: _NET_WM_VISIBLE_NAME = 12% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:50.591: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 12% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:52.684: 0x5e00002: WM_NAME = 13% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:52.687: 0x5e00002: WM_ICON_NAME = 13% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft .%G.........%@
26:52.687: 0x5e00002: _NET_WM_NAME = 13% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:52.687: 0x5e00002: _NET_WM_ICON_NAME = 13% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:52.687: 0x5e00002: _NET_WM_VISIBLE_NAME = 13% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:52.687: 0x5e00002: _NET_WM_VISIBLE_ICON_NAME = 13% / 00:03:27 - This guy spent over 2 years building a fully working computer in Minecraft ........
26:54.088: 0x5e00002: Send ClientMessage _NET_WM_STATE 32 data=REMOVE,_NET_WM_STATE_ABOVE,
26:54.088: 0x5e00002: _WIN_LAYER = 4
26:54.088: 0x0000136: Configure 0xe001fb 81x794+1505+10 Override Above=0xe0082b
26:54.088: 0x1400003: Visibility Unobscured 
26:54.088: 0x5e00002: Visibility PartiallyObscured 
26:54.088: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_STICKY
26:56.134: 0x4800005: _NET_WM_USER_TIME = 336106016
26:56.313: 0x4800005: Defocus Grab Ancestor
26:56.313: 0x0000136: Focus Grab Inferior
26:56.313: 0x5e00002: Focus Grab Pointer
26:56.313: 0x0000136: Create 0xe00c07 1x1+0+0 Override
26:56.314: 0x0000136: Configure 0xe00c07 587x222+506+339 Override Above=0x1a00002
26:56.314: 0x0000136: Mapped 0xe00c07 Override
26:56.314: 0x5e00002: Leave Grab Nonlinear Nofocus
26:56.314: 0x0000136: Defocus Grab Inferior
26:56.314: 0x4800005: _NET_WM_STATE = 
26:56.316: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_FOCUSED, _NET_WM_STATE_STICKY
26:56.316: 0x0000136: _NET_ACTIVE_WINDOW = 0x5e00002
26:56.317: 0x0000136: _NET_CLIENT_LIST_STACKING = 0x1000025, 0x1000042, 0x3e00002, 0x1000075, 0x1000009, 0x2800005, 0x420001d, 0x4200045, 0x4800009, 0x1000091, 0x1000083, 0x4800005, 0x5e00002, 0x1400003
26:56.317: 0x4800005: Defocus WhileGrabbed Nonlinear
26:56.317: 0x5e00002: Focus WhileGrabbed Nonlinear
26:57.612: 0x5e00002: _NET_WM_STATE = _NET_WM_STATE_STICKY
26:57.613: 0x1000083: _NET_WM_STATE = _NET_WM_STATE_FOCUSED
26:57.613: 0x0000136: _NET_ACTIVE_WINDOW = 0x1000083
26:57.613: 0x5e00002: Defocus WhileGrabbed Nonlinear
26:57.613: 0x1000083: Focus WhileGrabbed Nonlinear
26:57.950: 0x5e00002: Enter Ungrab Nonlinear Nofocus
26:57.950: 0x1000083: Focus Ungrab Nonlinear
26:57.951: 0x0000136: Unmap 0xe00c07
26:57.951: 0x0000136: Configure 0xe003bc 488x350+273+525 Override Above=0xe0082b
26:57.951: 0x1000083: Visibility Unobscured 
26:57.951: 0x0000136: _NET_CLIENT_LIST_STACKING = 0x1000025, 0x1000042, 0x3e00002, 0x1000075, 0x1000009, 0x2800005, 0x420001d, 0x4200045, 0x4800009, 0x1000091, 0x4800005, 0x5e00002, 0x1000083, 0x1400003

First time I just stopped mpv video playing while the focus was still on chromium window. The lua script removes the ontop flag when paused ( data=REMOVE,_NET_WM_STATE_ABOVE ). The ontop layered gkrellm instantly get above the mpv window, but the focused window is below the unfocused mpv window. Then resuming playback, pausing again, and clicking on the already focused chromium, which now stacks above mpv.

So is it normal when the focused normal (chromium) window is below the unfocused normal (mpv) window?

gijsbers commented 2 years ago

Icewm doesn't enforce that a focused remains on top. There is RaiseOnFocus, but it only raises when a window is activated. When you remove the Above flag, mpv is lowered to the head of layer 4, which is on top of the chromium. The solution is to add a -f raise to icesh.

zaza42 commented 2 years ago

Ok, thanks for the info.