tiling: Mouse dragging visuals
This commit is contained in:
parent
bd5d573d08
commit
85edfc7141
4 changed files with 1034 additions and 308 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -1020,23 +1020,11 @@ impl Shell {
|
|||
}
|
||||
|
||||
pub fn active_space(&self, output: &Output) -> &Workspace {
|
||||
match &self.workspaces {
|
||||
WorkspaceMode::OutputBound(sets, _) => {
|
||||
let set = sets.get(output).unwrap();
|
||||
&set.workspaces[set.active]
|
||||
}
|
||||
WorkspaceMode::Global(set) => &set.workspaces[set.active],
|
||||
}
|
||||
self.workspaces.active(output).1
|
||||
}
|
||||
|
||||
pub fn active_space_mut(&mut self, output: &Output) -> &mut Workspace {
|
||||
match &mut self.workspaces {
|
||||
WorkspaceMode::OutputBound(sets, _) => {
|
||||
let set = sets.get_mut(output).unwrap();
|
||||
&mut set.workspaces[set.active]
|
||||
}
|
||||
WorkspaceMode::Global(set) => &mut set.workspaces[set.active],
|
||||
}
|
||||
self.workspaces.active_mut(output)
|
||||
}
|
||||
|
||||
pub fn visible_outputs_for_surface<'a>(
|
||||
|
|
|
|||
|
|
@ -202,14 +202,15 @@ impl Workspace {
|
|||
}
|
||||
|
||||
pub fn element_under(
|
||||
&self,
|
||||
&mut self,
|
||||
location: Point<f64, Logical>,
|
||||
overview: OverviewMode,
|
||||
) -> Option<(PointerFocusTarget, Point<i32, Logical>)> {
|
||||
self.floating_layer
|
||||
.space
|
||||
.element_under(location)
|
||||
.map(|(mapped, p)| (mapped.clone().into(), p))
|
||||
.or_else(|| self.tiling_layer.element_under(location))
|
||||
.or_else(|| self.tiling_layer.element_under(location, overview))
|
||||
}
|
||||
|
||||
pub fn element_geometry(&self, elem: &CosmicMapped) -> Option<Rectangle<i32, Logical>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue