shell: Move seats into shell
This commit is contained in:
parent
1216cd0b67
commit
647deb81f1
31 changed files with 824 additions and 883 deletions
|
|
@ -64,7 +64,9 @@ impl ScreencopyHandler for State {
|
|||
fn capture_cursor_source(&mut self, _source: &ImageSourceData) -> Option<BufferConstraints> {
|
||||
let size = if let Some((geometry, _)) = self
|
||||
.common
|
||||
.last_active_seat()
|
||||
.shell
|
||||
.seats
|
||||
.last_active()
|
||||
.cursor_geometry((0.0, 0.0), self.common.clock.now())
|
||||
{
|
||||
geometry.size
|
||||
|
|
@ -125,7 +127,7 @@ impl ScreencopyHandler for State {
|
|||
}
|
||||
fn new_cursor_session(&mut self, session: CursorSession) {
|
||||
let (pointer_loc, pointer_size, hotspot) = {
|
||||
let seat = self.common.last_active_seat();
|
||||
let seat = self.common.shell.seats.last_active();
|
||||
|
||||
let pointer = seat.get_pointer().unwrap();
|
||||
let pointer_loc = pointer.current_location().to_i32_round().as_global();
|
||||
|
|
@ -266,7 +268,7 @@ impl ScreencopyHandler for State {
|
|||
return;
|
||||
}
|
||||
|
||||
let seat = self.common.last_active_seat().clone();
|
||||
let seat = self.common.shell.seats.last_active().clone();
|
||||
render_cursor_to_buffer(self, &session, frame, &seat);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -286,7 +286,10 @@ pub fn render_workspace_to_buffer(
|
|||
dt,
|
||||
age,
|
||||
additional_damage,
|
||||
common,
|
||||
&common.shell,
|
||||
&common.config,
|
||||
&common.theme,
|
||||
common.clock.now(),
|
||||
&output,
|
||||
None,
|
||||
handle,
|
||||
|
|
@ -311,7 +314,10 @@ pub fn render_workspace_to_buffer(
|
|||
dt,
|
||||
age,
|
||||
additional_damage,
|
||||
common,
|
||||
&common.shell,
|
||||
&common.config,
|
||||
&common.theme,
|
||||
common.clock.now(),
|
||||
&output,
|
||||
None,
|
||||
handle,
|
||||
|
|
@ -529,7 +535,7 @@ pub fn render_window_to_buffer(
|
|||
.map(Into::<WindowCaptureElement<R>>::into),
|
||||
);
|
||||
|
||||
let seat = common.last_active_seat().clone();
|
||||
let seat = common.shell.seats.last_active().clone();
|
||||
if let Some(location) = {
|
||||
if let Some(mapped) = common.shell.element_for_surface(window) {
|
||||
mapped.cursor_position(&seat).and_then(|mut p| {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue