baskerville / bspwm

A tiling window manager based on binary space partitioning
BSD 2-Clause "Simplified" License
7.61k stars 420 forks source link

set _NET_WM_WINDOW_TYPE on monitor root window #1453

Open gandalf3 opened 1 year ago

gandalf3 commented 1 year ago

set window type for monitor roots to _NET_WM_WINDOW_TYPE_DESKTOP to prevent them from being considered an application window by, for example, screen capture software.

prior to this change firefox would offer monitor root windows in its window capture chooser interface, and if chosen, would raise them which would cause input events to be misdirected.

gandalf3 commented 1 year ago

perhaps _NET_WM_WINDOW_TYPE_DESKTOP isn't exactly a perfect fit for this, but this was the simplest/cleanest change i found that prevents firefox from offering these windows. a possible alternative might be not setting WM_STATE, but this would require more extensive changes.

for ease of reference, firefox's window listing code can be viewed here.