wayland: implement scaling
This involves many subsystems:
- config:
- allow setting the connector scale
- allow setting the cursor size
- cursors:
- load server cursors for all requested sizes and scales
- wl_surface:
- track the output the surface belongs to
- send wl_surface.enter/leave
- wl_output:
- implement wl_output.scale
- text:
- pre-render texts for all used scales
- renderer:
- properly align scale textures and rectangles
- wp_fractional_scale:
- new interface for fractional scaling
This commit is contained in:
parent
16aec8f87e
commit
e52a60b3b6
41 changed files with 1417 additions and 364 deletions
|
|
@ -14,6 +14,7 @@ use {
|
|||
clientmem::{self, ClientMemError},
|
||||
config::ConfigProxy,
|
||||
dbus::Dbus,
|
||||
fixed::Fixed,
|
||||
forker,
|
||||
globals::Globals,
|
||||
ifs::{wl_output::WlOutputGlobal, wl_surface::NoneSurfaceExt},
|
||||
|
|
@ -31,7 +32,8 @@ use {
|
|||
user_session::import_environment,
|
||||
utils::{
|
||||
clonecell::CloneCell, errorfmt::ErrorFmt, fdcloser::FdCloser, numcell::NumCell,
|
||||
oserror::OsError, queue::AsyncQueue, run_toplevel::RunToplevel, tri::Try,
|
||||
oserror::OsError, queue::AsyncQueue, refcounted::RefCounted, run_toplevel::RunToplevel,
|
||||
tri::Try,
|
||||
},
|
||||
wheel::{Wheel, WheelError},
|
||||
xkbcommon::XkbContext,
|
||||
|
|
@ -120,6 +122,8 @@ fn start_compositor2(
|
|||
let wheel = Wheel::new(&engine, &ring)?;
|
||||
let (_run_toplevel_future, run_toplevel) = RunToplevel::install(&engine);
|
||||
let node_ids = NodeIds::default();
|
||||
let scales = RefCounted::default();
|
||||
scales.add(Fixed::from_int(1));
|
||||
let state = Rc::new(State {
|
||||
xkb_ctx,
|
||||
backend: CloneCell::new(Rc::new(DummyBackend)),
|
||||
|
|
@ -187,6 +191,8 @@ fn start_compositor2(
|
|||
locked: Cell::new(false),
|
||||
lock: Default::default(),
|
||||
},
|
||||
scales,
|
||||
cursor_sizes: Default::default(),
|
||||
});
|
||||
state.tracker.register(ClientId::from_raw(0));
|
||||
create_dummy_output(&state);
|
||||
|
|
@ -376,6 +382,7 @@ fn create_dummy_output(state: &Rc<State>) {
|
|||
scroll: Default::default(),
|
||||
pointer_positions: Default::default(),
|
||||
lock_surface: Default::default(),
|
||||
preferred_scale: Cell::new(Fixed::from_int(1)),
|
||||
});
|
||||
let dummy_workspace = Rc::new(WorkspaceNode {
|
||||
id: state.node_ids.next(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue