1
0
Fork 0
forked from wry/wry

wayland: remove Object::num_requests

This commit is contained in:
Julian Orth 2024-02-06 12:05:03 +01:00
parent 19bd17c7dc
commit 0ac1bb8507
76 changed files with 168 additions and 486 deletions

View file

@ -253,22 +253,14 @@ impl XdgPopup {
}
object_base! {
XdgPopup;
self = XdgPopup;
DESTROY => destroy,
GRAB => grab,
REPOSITION => reposition,
REPOSITION => reposition if self.xdg.base.version >= 3,
}
impl Object for XdgPopup {
fn num_requests(&self) -> u32 {
let last_req = match self.xdg.base.version {
0..=2 => GRAB,
_ => REPOSITION,
};
last_req + 1
}
fn break_loops(&self) {
self.destroy_node();
self.parent.set(None);

View file

@ -360,7 +360,7 @@ impl XdgToplevel {
}
object_base! {
XdgToplevel;
self = XdgToplevel;
DESTROY => destroy,
SET_PARENT => set_parent,
@ -379,10 +379,6 @@ object_base! {
}
impl Object for XdgToplevel {
fn num_requests(&self) -> u32 {
SET_MINIMIZED + 1
}
fn break_loops(&self) {
self.tl_destroy();
self.parent.set(None);