xmonad / xmonad-contrib

Contributed modules for xmonad
https://xmonad.org
BSD 3-Clause "New" or "Revised" License
584 stars 274 forks source link

The currently focused window is not last in `_NET_CLIENT_LIST_STACKING` #771

Closed ilya-bobyr closed 1 year ago

ilya-bobyr commented 1 year ago

Problem Description

Freedesktop spec on _NET_CLIENT_LIST_STACKING says:

_NET_CLIENT_LIST_STACKING has bottom-to-top stacking order.

But, currently, _NET_CLIENT_LIST_STACKING is using workspace order for windows, only ordering windows within a workspace subgroup in the focus order. Though, even that ordering is not completely bottom-to-top.

I have an application that uses _NET_CLIENT_LIST_STACKING in order to determine the currently focused window. Yes, it should have used _NET_ACTIVE_WINDOW, but it is trying to work around some kind of bug.

Steps to Reproduce

Switching the currently active window in a workspace that is not the very last one, I see this:

❯ while true; xprop -root _NET_CLIENT_LIST_STACKING ; sleep 1s; end
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x4000003, 0x2a00006, 0x2c00008, 0x4e00002, 0x260002e, 0x1a00002, 0x260005a, 0x5a00002, 0x2600062, 0x260004a, 0x2600042, 0x2600052
_NET_CLIENT_LIST_STACKING(WINDOW): window id # 0x4000003, 0x2a00006, 0x2c00008, 0x4e00002, 0x260002e, 0x5a00002, 0x1a00002, 0x260005a, 0x2600062, 0x260004a, 0x2600042, 0x2600052

Notice how the change happens in the middle of the list. Rather than in the last element.

Configuration File

Please include the smallest full configuration file that reproduces the problem you are experiencing:

module Main (main) where

import XMonad
import XMonad.Hooks.EwmhDesktops (ewmh, ewmhFullscreen)

main :: IO ()
main =
  xmonad
    $ ewmhFullscreen
    $ ewmh
    def

Checklist

slotThe commented 1 year ago

Closed by #772