xmonad / xmonad-contrib

Contributed modules for xmonad

Home Page:https://xmonad.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Window Swallowing error with multi monitor

arthurmelton opened this issue · comments

Problem Description

If you turn on window swallowing but before the window pops up you focus a new monitor then it does not hide the terminal.

Steps to Reproduce

run sleep 5; mpv https://www.w3schools.com/html/mov_bbb.mp4

focus a window on a different monitor (focusing a different monitor)

wait for the window to popup and see that the terminal has not minimized.

Configuration File

(its just the normal windowswallowing from the site)

Checklist

  • I've read CONTRIBUTING.md

  • I tested my configuration

    • With xmonad version 0.17.0
    • With xmonad-contrib version 0.17.0

It also seams that if I swallow a window that once the window closes (like one mpv finishes a video) and I am focused on a new monitor that it will add the terminal to that monitor and not the one it originated from.

This is one of the big assumptions of X.H.WindowSwallowing:

  -- For a window to be opened from within another window, that other window
  -- must be focused. Thus the parent window that would be swallowed has to be
  -- the currently focused window.

The implementation would probably have to get a bit more complicated if we wanted to support this use-case (even just focusing on visible workspaces and ignoring hidden ones). We would somehow list all parents of the child window and then check whether the condition applies for any one of them instead of just using the currently focused window. The stack restoring logic would probably also have to become a bit more extensive.

I'll mark it as a feature request.