mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-21 08:56:31 -05:00
xwayland/selection: rename Wayland-facing data and helpers
Previously, wlr_xwm_selection_transfer.source_fd meant: - the source of data in a Wayland -> X11 copy (good) - the destination of data in a X11 -> Wayland copy (confusing) This made reading through xwayland/selection/incoming.c difficult: in many places, "source" actually means "destination".
This commit is contained in:
parent
1b8330d1f8
commit
e75f483aeb
4 changed files with 30 additions and 30 deletions
|
|
@ -11,19 +11,19 @@
|
|||
#include "xwayland/selection.h"
|
||||
#include "xwayland/xwm.h"
|
||||
|
||||
void xwm_selection_transfer_remove_source(
|
||||
void xwm_selection_transfer_remove_event_source(
|
||||
struct wlr_xwm_selection_transfer *transfer) {
|
||||
if (transfer->source != NULL) {
|
||||
wl_event_source_remove(transfer->source);
|
||||
transfer->source = NULL;
|
||||
if (transfer->event_source != NULL) {
|
||||
wl_event_source_remove(transfer->event_source);
|
||||
transfer->event_source = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void xwm_selection_transfer_close_source_fd(
|
||||
void xwm_selection_transfer_close_wl_client_fd(
|
||||
struct wlr_xwm_selection_transfer *transfer) {
|
||||
if (transfer->source_fd >= 0) {
|
||||
close(transfer->source_fd);
|
||||
transfer->source_fd = -1;
|
||||
if (transfer->wl_client_fd >= 0) {
|
||||
close(transfer->wl_client_fd);
|
||||
transfer->wl_client_fd = -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue