wl_subsurface: remove size from position
This commit is contained in:
parent
6998e735e0
commit
138b84032a
3 changed files with 7 additions and 10 deletions
|
|
@ -742,8 +742,7 @@ impl WlSurface {
|
|||
if let Some(children) = self.children.borrow_mut().deref_mut() {
|
||||
for ss in children.subsurfaces.values() {
|
||||
let pos = ss.position.get();
|
||||
ss.surface
|
||||
.set_absolute_position(x1 + pos.x1(), y1 + pos.y1());
|
||||
ss.surface.set_absolute_position(x1 + pos.0, y1 + pos.1);
|
||||
}
|
||||
}
|
||||
for (_, con) in &self.text_input_connections {
|
||||
|
|
@ -878,7 +877,7 @@ impl WlSurface {
|
|||
let ce = ss.surface.extents.get();
|
||||
if !ce.is_empty() {
|
||||
let cp = ss.position.get();
|
||||
let ce = ce.move_(cp.x1(), cp.y1());
|
||||
let ce = ce.move_(cp.0, cp.1);
|
||||
extents = if extents.is_empty() {
|
||||
ce
|
||||
} else {
|
||||
|
|
@ -1517,7 +1516,7 @@ impl WlSurface {
|
|||
}
|
||||
let pos = child.sub_surface.position.get();
|
||||
let ext = child.sub_surface.surface.extents.get();
|
||||
let ext = ext.move_(pos.x1(), pos.y1());
|
||||
let ext = ext.move_(pos.0, pos.1);
|
||||
if ext.contains(x, y) {
|
||||
let (x, y) = ext.translate(x, y);
|
||||
if let Some(res) = child.sub_surface.surface.find_surface_at(x, y) {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use {
|
|||
},
|
||||
leaks::Tracker,
|
||||
object::{Object, Version},
|
||||
rect::Rect,
|
||||
utils::{
|
||||
clonecell::CloneCell,
|
||||
linkedlist::{LinkedNode, NodeRef},
|
||||
|
|
@ -36,7 +35,7 @@ pub struct WlSubsurface {
|
|||
unique_id: SubsurfaceId,
|
||||
pub surface: Rc<WlSurface>,
|
||||
pub(super) parent: Rc<WlSurface>,
|
||||
pub position: Cell<Rect>,
|
||||
pub position: Cell<(i32, i32)>,
|
||||
sync_requested: Cell<bool>,
|
||||
sync_ancestor: Cell<bool>,
|
||||
node: RefCell<Option<LinkedNode<StackElement>>>,
|
||||
|
|
@ -137,8 +136,7 @@ impl WlSubsurface {
|
|||
}
|
||||
if let Some((mut x, mut y)) = pending.position.take() {
|
||||
client_wire_scale_to_logical!(self.surface.client, x, y);
|
||||
self.position
|
||||
.set(self.surface.buffer_abs_pos.get().at_point(x, y));
|
||||
self.position.set((x, y));
|
||||
let (parent_x, parent_y) = self.parent.buffer_abs_pos.get().position();
|
||||
self.surface
|
||||
.set_absolute_position(parent_x + x, parent_y + y);
|
||||
|
|
|
|||
|
|
@ -389,12 +389,12 @@ impl Renderer<'_> {
|
|||
continue;
|
||||
}
|
||||
let pos = child.sub_surface.position.get();
|
||||
let (x1, y1) = self.base.scale_point(pos.x1(), pos.y1());
|
||||
let (x1, y1) = self.base.scale_point(pos.0, pos.1);
|
||||
self.render_surface_scaled(
|
||||
&child.sub_surface.surface,
|
||||
x + x1,
|
||||
y + y1,
|
||||
Some((pos.x1(), pos.y1())),
|
||||
Some(pos),
|
||||
bounds,
|
||||
true,
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue