mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-13 05:34:13 -04:00
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:
parent
04d448317a
commit
df8d12fa03
3 changed files with 48 additions and 4 deletions
|
|
@ -560,7 +560,8 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
|
|||
XCB_CW_COLORMAP | XCB_CW_CURSOR;
|
||||
uint32_t values[] = {
|
||||
0,
|
||||
XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY,
|
||||
XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY |
|
||||
XCB_EVENT_MASK_PROPERTY_CHANGE,
|
||||
x11->colormap,
|
||||
x11->transparent_cursor,
|
||||
};
|
||||
|
|
@ -742,7 +743,7 @@ void handle_x11_present_event(struct wlr_x11_backend *x11,
|
|||
};
|
||||
wlr_output_send_present(&output->wlr_output, &present_event);
|
||||
|
||||
if (output->mapped)
|
||||
if (output->mapped && !output->hidden)
|
||||
wlr_output_send_frame(&output->wlr_output);
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue