xwm: Add output_enter/leave events for OR windows
This commit is contained in:
parent
5dfefedb02
commit
f597fb89c6
1 changed files with 13 additions and 1 deletions
|
|
@ -2,11 +2,12 @@ use crate::{
|
||||||
backend::render::cursor::Cursor,
|
backend::render::cursor::Cursor,
|
||||||
shell::{CosmicSurface, Ordering, Shell},
|
shell::{CosmicSurface, Ordering, Shell},
|
||||||
state::{Data, State},
|
state::{Data, State},
|
||||||
utils::prelude::SeatExt,
|
utils::prelude::*,
|
||||||
wayland::{handlers::screencopy::PendingScreencopyBuffers, protocols::screencopy::SessionType},
|
wayland::{handlers::screencopy::PendingScreencopyBuffers, protocols::screencopy::SessionType},
|
||||||
};
|
};
|
||||||
use smithay::{
|
use smithay::{
|
||||||
backend::{drm::DrmNode, renderer::element::Id},
|
backend::{drm::DrmNode, renderer::element::Id},
|
||||||
|
desktop::space::SpaceElement,
|
||||||
reexports::x11rb::protocol::xproto::Window as X11Window,
|
reexports::x11rb::protocol::xproto::Window as X11Window,
|
||||||
utils::{Logical, Point, Rectangle, Size},
|
utils::{Logical, Point, Rectangle, Size},
|
||||||
xwayland::{
|
xwayland::{
|
||||||
|
|
@ -349,6 +350,17 @@ impl XwmHandler for Data {
|
||||||
{
|
{
|
||||||
or.above = ordering;
|
or.above = ordering;
|
||||||
}
|
}
|
||||||
|
let geo = window.geometry();
|
||||||
|
for (output, overlap) in self.state.common.shell.outputs().cloned().map(|o| {
|
||||||
|
let intersection = o.geometry().intersection(geo);
|
||||||
|
(o, intersection)
|
||||||
|
}) {
|
||||||
|
if let Some(overlap) = overlap {
|
||||||
|
window.output_enter(&output, overlap);
|
||||||
|
} else {
|
||||||
|
window.output_leave(&output);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue