input: Filter resize mode key combinations
This commit is contained in:
parent
8c52fc6eb1
commit
997223f20a
4 changed files with 96 additions and 4 deletions
|
|
@ -1187,6 +1187,17 @@ impl Shell {
|
|||
self.resize_mode.clone()
|
||||
}
|
||||
|
||||
pub fn resize_active_window(
|
||||
&mut self,
|
||||
seat: &Seat<State>,
|
||||
direction: ResizeDirection,
|
||||
edge: ResizeEdge,
|
||||
) {
|
||||
self.workspaces
|
||||
.active_mut(&seat.active_output())
|
||||
.resize(seat, direction, edge);
|
||||
}
|
||||
|
||||
pub fn refresh(&mut self) {
|
||||
#[cfg(feature = "debug")]
|
||||
puffin::profile_function!();
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ use tracing::warn;
|
|||
|
||||
use super::{
|
||||
element::{stack::CosmicStackRenderElement, window::CosmicWindowRenderElement, CosmicMapped},
|
||||
focus::{FocusStack, FocusStackMut},
|
||||
focus::{target::KeyboardFocusTarget, FocusStack, FocusStackMut},
|
||||
grabs::{ResizeEdge, ResizeGrab},
|
||||
CosmicMappedRenderElement, CosmicSurface,
|
||||
CosmicMappedRenderElement, CosmicSurface, ResizeDirection,
|
||||
};
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
@ -341,6 +341,18 @@ impl Workspace {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn resize(&mut self, seat: &Seat<State>, direction: ResizeDirection, edge: ResizeEdge) {
|
||||
if let Some(KeyboardFocusTarget::Fullscreen(_)) =
|
||||
seat.get_keyboard().unwrap().current_focus()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if !self.floating_layer.resize(seat, direction, edge) {
|
||||
self.tiling_layer.resize(seat, direction, edge);
|
||||
}
|
||||
}
|
||||
|
||||
pub fn move_request(
|
||||
&mut self,
|
||||
window: &CosmicSurface,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue