1
0
Fork 0
forked from wry/wry

autocommit 2022-04-11 13:11:56 CEST

This commit is contained in:
Julian Orth 2022-04-11 13:11:56 +02:00
parent 6b3316e920
commit 86ca98c38a
11 changed files with 23 additions and 12 deletions

View file

@ -11,7 +11,6 @@ use {
thiserror::Error,
};
#[allow(dead_code)]
pub const NAME_SINCE: u32 = 2;
#[allow(dead_code)]
pub const DESCRIPTION_SINCE: u32 = 2;
@ -46,7 +45,6 @@ impl ZxdgOutputV1 {
self.client.event(Done { self_id: self.id });
}
#[allow(dead_code)]
pub fn send_name(&self, name: &str) {
self.client.event(Name {
self_id: self.id,
@ -66,7 +64,10 @@ impl ZxdgOutputV1 {
let pos = self.output.global.position();
self.send_logical_position(pos.x1(), pos.y1());
self.send_logical_size(pos.width(), pos.height());
if self.version >= NO_DONE_SINCE || self.output.version < SEND_DONE_SINCE {
if self.version >= NAME_SINCE {
self.send_name(&self.output.global.connector.name);
}
if self.version >= NO_DONE_SINCE && self.output.version >= SEND_DONE_SINCE {
self.output.send_done();
} else {
self.send_done();