aboutsummaryrefslogtreecommitdiff
path: root/src/handlers
diff options
context:
space:
mode:
authorIvan Molodetskikh <yalterz@gmail.com>2024-01-03 11:16:47 +0400
committerIvan Molodetskikh <yalterz@gmail.com>2024-01-03 11:37:04 +0400
commit57a73476207bd33a26b39964feb01bb673be8a2b (patch)
tree70d813f595660c7473130bdc93c26d401c597f74 /src/handlers
parent628891db2c8b0467f5dcf1f82be6db1570fea84b (diff)
downloadniri-57a73476207bd33a26b39964feb01bb673be8a2b.tar.gz
niri-57a73476207bd33a26b39964feb01bb673be8a2b.tar.bz2
niri-57a73476207bd33a26b39964feb01bb673be8a2b.zip
Move import_dmabuf to backends
Diffstat (limited to 'src/handlers')
-rw-r--r--src/handlers/mod.rs13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index f7d94ed0..0b3d19b6 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -9,7 +9,6 @@ use std::sync::Arc;
use std::thread;
use smithay::backend::allocator::dmabuf::Dmabuf;
-use smithay::backend::renderer::ImportDma;
use smithay::desktop::{PopupKind, PopupManager};
use smithay::input::pointer::{CursorIcon, CursorImageStatus, PointerHandle};
use smithay::input::{Seat, SeatHandler, SeatState};
@@ -202,17 +201,11 @@ impl DmabufHandler for State {
dmabuf: Dmabuf,
notifier: ImportNotifier,
) {
- let Some(renderer) = self.backend.renderer() else {
- notifier.failed();
- return;
- };
-
- match renderer.import_dmabuf(&dmabuf, None) {
- Ok(_texture) => {
+ match self.backend.import_dmabuf(&dmabuf) {
+ Ok(_) => {
let _ = notifier.successful::<State>();
}
- Err(err) => {
- debug!("error importing dmabuf: {err:?}");
+ Err(_) => {
notifier.failed();
}
}