mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
Merge branch 'github/fork/imirkin/pause-render' into 'master'
backend/x11: only send frames when the window is visible Closes #2675 See merge request wlroots/wlroots!2682
This commit is contained in:
commit
1467218b64
3 changed files with 71 additions and 5 deletions
|
|
@ -628,7 +628,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,
|
||||
};
|
||||
|
|
@ -676,6 +677,8 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
|
|||
|
||||
xcb_flush(x11->xcb);
|
||||
|
||||
output->mapped = true;
|
||||
|
||||
wl_list_insert(&x11->outputs, &output->link);
|
||||
|
||||
wlr_pointer_init(&output->pointer, &x11_pointer_impl, "x11-pointer");
|
||||
|
|
@ -796,7 +799,8 @@ void handle_x11_present_event(struct wlr_x11_backend *x11,
|
|||
timespec_from_nsec(&present_event.when, complete_notify->ust * 1000);
|
||||
wlr_output_send_present(&output->wlr_output, &present_event);
|
||||
|
||||
wlr_output_send_frame(&output->wlr_output);
|
||||
if (output->mapped && !output->hidden)
|
||||
wlr_output_send_frame(&output->wlr_output);
|
||||
break;
|
||||
default:
|
||||
wlr_log(WLR_DEBUG, "Unhandled Present event %"PRIu16, event->event_type);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue