tree: update to latest version of wp_fractional_scale
This commit is contained in:
parent
e61d6ab074
commit
5b2eb5855a
22 changed files with 104 additions and 54 deletions
|
|
@ -72,7 +72,7 @@ pub struct WlOutputGlobal {
|
|||
pub unused_captures: LinkedList<Rc<ZwlrScreencopyFrameV1>>,
|
||||
pub pending_captures: LinkedList<Rc<ZwlrScreencopyFrameV1>>,
|
||||
pub destroyed: Cell<bool>,
|
||||
pub legacy_scale: Cell<i32>,
|
||||
pub legacy_scale: Cell<u32>,
|
||||
}
|
||||
|
||||
#[derive(Eq, PartialEq)]
|
||||
|
|
@ -316,7 +316,7 @@ impl WlOutput {
|
|||
fn send_scale(self: &Rc<Self>) {
|
||||
let event = Scale {
|
||||
self_id: self.id,
|
||||
factor: self.global.legacy_scale.get(),
|
||||
factor: self.global.legacy_scale.get() as _,
|
||||
};
|
||||
self.client.event(event);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ impl SurfaceRole {
|
|||
}
|
||||
}
|
||||
|
||||
pub struct SurfaceSendPreferredScaleVisitor(pub Fixed);
|
||||
pub struct SurfaceSendPreferredScaleVisitor;
|
||||
impl NodeVisitorBase for SurfaceSendPreferredScaleVisitor {
|
||||
fn visit_surface(&mut self, node: &Rc<WlSurface>) {
|
||||
node.send_preferred_scale();
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use {
|
|||
leaks::Tracker,
|
||||
rect::Rect,
|
||||
render::Renderer,
|
||||
scale::Scale,
|
||||
tree::{Node, NodeVisitorBase, OutputNode},
|
||||
},
|
||||
std::{cell::Cell, ops::Deref, rc::Rc},
|
||||
|
|
@ -103,7 +104,7 @@ impl Cursor for CursorSurface {
|
|||
FrameRequests.visit_surface(&self.surface);
|
||||
}
|
||||
|
||||
fn extents_at_scale(&self, scale: Fixed) -> Rect {
|
||||
fn extents_at_scale(&self, scale: Scale) -> Rect {
|
||||
let rect = self.extents.get();
|
||||
if scale == 1 {
|
||||
return rect;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ impl WpFractionalScaleV1 {
|
|||
pub fn send_preferred_scale(&self) {
|
||||
self.client.event(PreferredScale {
|
||||
self_id: self.id,
|
||||
scale: self.surface.output.get().preferred_scale.get(),
|
||||
scale: self.surface.output.get().preferred_scale.get().0,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue