mirror of
https://github.com/wez/wezterm.git
synced 2024-09-11 14:25:57 +03:00
Fix drag & drop
This commit is contained in:
parent
ba18d0590c
commit
423859cef7
@ -2,6 +2,7 @@ use crate::wayland::read_pipe_with_timeout;
|
|||||||
use crate::ConnectionOps;
|
use crate::ConnectionOps;
|
||||||
use filedescriptor::{FileDescriptor, Pipe};
|
use filedescriptor::{FileDescriptor, Pipe};
|
||||||
use smithay_client_toolkit as toolkit;
|
use smithay_client_toolkit as toolkit;
|
||||||
|
use std::os::fd::{AsRawFd, BorrowedFd};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use toolkit::reexports::client::protocol::wl_data_offer::WlDataOffer;
|
use toolkit::reexports::client::protocol::wl_data_offer::WlDataOffer;
|
||||||
use url::Url;
|
use url::Url;
|
||||||
@ -32,7 +33,9 @@ impl DragAndDrop {
|
|||||||
let pipe = Pipe::new()
|
let pipe = Pipe::new()
|
||||||
.map_err(|err| log::error!("Unable to create pipe: {:#}", err))
|
.map_err(|err| log::error!("Unable to create pipe: {:#}", err))
|
||||||
.ok()?;
|
.ok()?;
|
||||||
offer.receive(URI_MIME_TYPE.to_string(), todo!());
|
offer.receive(URI_MIME_TYPE.to_string(), unsafe {
|
||||||
|
BorrowedFd::borrow_raw(pipe.write.as_raw_fd())
|
||||||
|
});
|
||||||
let read = pipe.read;
|
let read = pipe.read;
|
||||||
offer.finish();
|
offer.finish();
|
||||||
Some(SurfaceAndPipe { window_id, read })
|
Some(SurfaceAndPipe { window_id, read })
|
||||||
|
Loading…
Reference in New Issue
Block a user