mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
Implement maximize-to-edges (true Wayland maximize)
This commit is contained in:
@@ -303,6 +303,9 @@ pub enum Action {
|
||||
#[knuffel(skip)]
|
||||
SwitchPresetWindowHeightBackById(u64),
|
||||
MaximizeColumn,
|
||||
MaximizeWindowToEdges,
|
||||
#[knuffel(skip)]
|
||||
MaximizeWindowToEdgesById(u64),
|
||||
SetColumnWidth(#[knuffel(argument, str)] SizeChange),
|
||||
ExpandColumnToAvailableWidth,
|
||||
SwitchLayout(#[knuffel(argument, str)] LayoutSwitchTarget),
|
||||
@@ -568,6 +571,10 @@ impl From<niri_ipc::Action> for Action {
|
||||
Self::SwitchPresetWindowHeightBackById(id)
|
||||
}
|
||||
niri_ipc::Action::MaximizeColumn {} => Self::MaximizeColumn,
|
||||
niri_ipc::Action::MaximizeWindowToEdges { id: None } => Self::MaximizeWindowToEdges,
|
||||
niri_ipc::Action::MaximizeWindowToEdges { id: Some(id) } => {
|
||||
Self::MaximizeWindowToEdgesById(id)
|
||||
}
|
||||
niri_ipc::Action::SetColumnWidth { change } => Self::SetColumnWidth(change),
|
||||
niri_ipc::Action::ExpandColumnToAvailableWidth {} => Self::ExpandColumnToAvailableWidth,
|
||||
niri_ipc::Action::SwitchLayout { layout } => Self::SwitchLayout(layout),
|
||||
|
||||
@@ -1578,6 +1578,7 @@ mod tests {
|
||||
open_maximized: Some(
|
||||
true,
|
||||
),
|
||||
open_maximized_to_edges: None,
|
||||
open_fullscreen: Some(
|
||||
false,
|
||||
),
|
||||
|
||||
@@ -24,6 +24,8 @@ pub struct WindowRule {
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
pub open_maximized: Option<bool>,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
pub open_maximized_to_edges: Option<bool>,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
pub open_fullscreen: Option<bool>,
|
||||
#[knuffel(child, unwrap(argument))]
|
||||
pub open_floating: Option<bool>,
|
||||
|
||||
Reference in New Issue
Block a user