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
|
|
@ -52,7 +52,7 @@ void xwm_selection_transfer_destroy(
|
|||
if (transfer->incoming_window) {
|
||||
struct wlr_xwm *xwm = transfer->selection->xwm;
|
||||
xcb_destroy_window(xwm->xcb_conn, transfer->incoming_window);
|
||||
xcb_flush(xwm->xcb_conn);
|
||||
xwm_schedule_flush(xwm);
|
||||
}
|
||||
|
||||
wl_list_remove(&transfer->link);
|
||||
|
|
@ -269,14 +269,14 @@ static void xwm_selection_set_owner(struct wlr_xwm_selection *selection,
|
|||
selection->window,
|
||||
selection->atom,
|
||||
XCB_TIME_CURRENT_TIME);
|
||||
xcb_flush(selection->xwm->xcb_conn);
|
||||
xwm_schedule_flush(selection->xwm);
|
||||
} else {
|
||||
if (selection->owner == selection->window) {
|
||||
xcb_set_selection_owner(selection->xwm->xcb_conn,
|
||||
XCB_WINDOW_NONE,
|
||||
selection->atom,
|
||||
selection->timestamp);
|
||||
xcb_flush(selection->xwm->xcb_conn);
|
||||
xwm_schedule_flush(selection->xwm);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue