backend/x11: listen to _NET_WM_STATE changes for determining hidden

Some window managers don't unmap windows when they're hidden. Also check
the _NET_WM_STATE property for _NET_WM_STATE_HIDDEN. This way if the
window is hidden or unmapped, then we won't send updates.
This commit is contained in:
Ilia Mirkin 2021-01-25 18:37:46 -05:00
parent 04d448317a
commit df8d12fa03
3 changed files with 48 additions and 4 deletions

View file

@ -52,6 +52,7 @@ struct wlr_x11_output {
uint64_t last_msc;
bool mapped;
bool hidden;
struct {
struct wlr_swapchain *swapchain;
@ -99,6 +100,8 @@ struct wlr_x11_backend {
xcb_atom_t wm_protocols;
xcb_atom_t wm_delete_window;
xcb_atom_t net_wm_name;
xcb_atom_t net_wm_state;
xcb_atom_t net_wm_state_hidden;
xcb_atom_t utf8_string;
xcb_atom_t variable_refresh;
} atoms;