Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window Swallowing error with multi monitor #752

Open
3 tasks done
arthurmelton opened this issue Sep 6, 2022 · 2 comments
Open
3 tasks done

Window Swallowing error with multi monitor #752

arthurmelton opened this issue Sep 6, 2022 · 2 comments

Comments

@arthurmelton
Copy link

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
@arthurmelton
Copy link
Author

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.

@slotThe
Copy link
Member

slotThe commented Sep 7, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants