1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-08-17 14:51:04 +02:00

fix(clipboard): copying large images filling write pipe

Fixes partially #86
This commit is contained in:
Jake Stanger 2023-04-30 22:50:43 +01:00
parent 735f5cc9f1
commit e1abadcf39
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
3 changed files with 103 additions and 21 deletions

View file

@ -7,7 +7,7 @@ use smithay_client_toolkit::data_device_manager::ReadPipe;
use std::ops::DerefMut;
use std::os::fd::FromRawFd;
use std::sync::{Arc, Mutex};
use tracing::warn;
use tracing::{debug, warn};
use wayland_client::{Connection, Dispatch, Proxy, QueueHandle};
use wayland_protocols_wlr::data_control::v1::client::zwlr_data_control_offer_v1::{
Event, ZwlrDataControlOfferV1,
@ -149,6 +149,7 @@ where
let data = data.data_control_offer_data();
if let Event::Offer { mime_type } = event {
debug!("Adding new offer with type '{mime_type}'");
data.push_mime_type(mime_type.clone());
state.offer(conn, qh, &mut lock!(data.inner).offer, mime_type);
}