mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
xwayland/xwm: implement somewhat asynchronous request flushing
Instead of calling xcb_flush() directly, wait until the FD is writable. Ideally we'd have a non-blocking variant instead of xcb_flush(), but libxcb doesn't have this. Also libxcb blocks when its internal buffer is full, but not much we can do here.
This commit is contained in:
parent
c9fe96102d
commit
6ada67da9b
6 changed files with 39 additions and 23 deletions
|
|
@ -33,7 +33,7 @@ static void xwm_selection_send_notify(struct wlr_xwm *xwm,
|
|||
XCB_EVENT_MASK_NO_EVENT,
|
||||
&selection_notify,
|
||||
sizeof(selection_notify));
|
||||
xcb_flush(xwm->xcb_conn);
|
||||
xwm_schedule_flush(xwm);
|
||||
}
|
||||
|
||||
static int xwm_selection_flush_source_data(
|
||||
|
|
@ -46,7 +46,7 @@ static int xwm_selection_flush_source_data(
|
|||
8, // format
|
||||
transfer->source_data.size,
|
||||
transfer->source_data.data);
|
||||
xcb_flush(transfer->selection->xwm->xcb_conn);
|
||||
xwm_schedule_flush(transfer->selection->xwm);
|
||||
transfer->property_set = true;
|
||||
size_t length = transfer->source_data.size;
|
||||
transfer->source_data.size = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue