feat: workspace switching touchpad gestures

This commit is contained in:
Ryan Brue 2024-03-07 13:14:53 -06:00 committed by Victoria Brekenfeld
parent f1d8225ddb
commit fc2173d028
9 changed files with 767 additions and 89 deletions

View file

@ -10,7 +10,7 @@ use smithay::{
};
use crate::{
shell::{CosmicSurface, Shell},
shell::{CosmicSurface, Shell, WorkspaceDelta},
utils::prelude::*,
wayland::protocols::{
toplevel_info::ToplevelInfoHandler,
@ -60,7 +60,11 @@ impl ToplevelManagementHandler for State {
.unwrap()
.clone();
let _ = self.common.shell.activate(&output, idx as usize); // TODO: Move pointer?
let _ = self.common.shell.activate(
&output,
idx as usize,
WorkspaceDelta::new_shortcut(),
); // TODO: Move pointer?
mapped.focus_window(window);
Common::set_focus(self, Some(&mapped.clone().into()), &seat, None);
return;

View file

@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-3.0-only
use crate::{
shell::WorkspaceDelta,
state::ClientState,
utils::prelude::*,
wayland::protocols::workspace::{
@ -38,7 +39,11 @@ impl WorkspaceHandler for State {
});
if let Some((output, idx)) = maybe {
let _ = self.common.shell.activate(&output, idx); // TODO: move cursor?
let _ = self.common.shell.activate(
&output,
idx,
WorkspaceDelta::new_shortcut(),
); // TODO: move cursor?
}
}
Request::SetTilingState { workspace, state } => {