xmonad / xmonad-contrib

Contributed modules for xmonad

Home Page:https://xmonad.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The currently focused window is not last in `_NET_CLIENT_LIST_STACKING`

ilya-bobyr opened this issue · comments

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

  • I've read CONTRIBUTING.md
  • I tested my configuration
    • With xmonad commit a2259bb3091429f4293d371e13fd5a2ee8da30db Sun Sep 18 16:27:14 2022 +0200
    • With xmonad-contrib commit fce5558b625df3693a1455eb251e68bb2c6980de Thu Oct 27 07:45:48 2022 +0200

Closed by #772