aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2023-11-24 11:49:07 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2023-11-24 11:49:07 +0400
commita2ad7b0854540f01afa9433ff9d01438f4d1bd22 (patch)
tree5d218ce089e7286488deeaf1ae632f9b56351fb2 /src/handlers
parentc7f8a188ea4ba0bb233141dc3e26b9212a0a3f42 (diff)
downloadniri-a2ad7b0854540f01afa9433ff9d01438f4d1bd22.tar.gz
niri-a2ad7b0854540f01afa9433ff9d01438f4d1bd22.tar.bz2
niri-a2ad7b0854540f01afa9433ff9d01438f4d1bd22.zip
Upgrade dependencies
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/mod.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index 049798dc..f9bd2589 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -20,7 +20,7 @@ use smithay::reexports::wayland_server::protocol::wl_surface::WlSurface;
use smithay::reexports::wayland_server::Resource;
use smithay::utils::{Logical, Rectangle, Size};
use smithay::wayland::compositor::{send_surface_state, with_states};
-use smithay::wayland::dmabuf::{DmabufGlobal, DmabufHandler, DmabufState, ImportError};
+use smithay::wayland::dmabuf::{DmabufGlobal, DmabufHandler, DmabufState, ImportNotifier};
use smithay::wayland::input_method::{InputMethodHandler, PopupSurface};
use smithay::wayland::selection::data_device::{
set_data_device_focus, ClientDndGrabHandler, DataDeviceHandler, DataDeviceState,
@@ -189,15 +189,18 @@ impl DmabufHandler for State {
&mut self,
_global: &DmabufGlobal,
dmabuf: Dmabuf,
- ) -> Result<(), ImportError> {
+ notifier: ImportNotifier,
+ ) {
let renderer = self.backend.renderer().expect(
"the dmabuf global must be created and destroyed together with the output device",
);
match renderer.import_dmabuf(&dmabuf, None) {
- Ok(_texture) => Ok(()),
+ Ok(_texture) => {
+ let _ = notifier.successful::<State>();
+ }
Err(err) => {
debug!("error importing dmabuf: {err:?}");
- Err(ImportError::Failed)
+ notifier.failed();
}
}
}