wayland: implement wlr-data-control
This commit is contained in:
parent
8bca8b0e86
commit
99be020c19
18 changed files with 985 additions and 33 deletions
|
|
@ -7,6 +7,7 @@ use {
|
|||
ipc::{
|
||||
wl_data_device::{ClipboardIpc, WlDataDevice},
|
||||
x_data_device::{XClipboardIpc, XPrimarySelectionIpc},
|
||||
zwlr_data_control_device_v1::ZwlrDataControlDeviceV1,
|
||||
zwp_primary_selection_device_v1::{
|
||||
PrimarySelectionIpc, ZwpPrimarySelectionDeviceV1,
|
||||
},
|
||||
|
|
@ -508,6 +509,17 @@ impl WlSeatGlobal {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn for_each_wlr_data_device<C>(&self, ver: u32, mut f: C)
|
||||
where
|
||||
C: FnMut(&Rc<ZwlrDataControlDeviceV1>),
|
||||
{
|
||||
for dd in self.wlr_data_devices.lock().values() {
|
||||
if dd.version >= ver {
|
||||
f(dd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn surface_pointer_frame(&self, surface: &WlSurface) {
|
||||
self.surface_pointer_event(POINTER_FRAME_SINCE_VERSION, surface, |p| p.send_frame());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue