mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-07-20 12:01:21 +02:00
fix(wm): check height for cross-monitor focus idx
This commit is an example of how it may be possible to have height-aware cross-monitor focus movements. I am not able to test this code as I don't have enough monitors to replicate the issue in #447. re #447
This commit is contained in:
@@ -703,10 +703,12 @@ impl WindowManager {
|
|||||||
if let Layout::Custom(ref mut custom) = rule.1 {
|
if let Layout::Custom(ref mut custom) = rule.1 {
|
||||||
match sizing {
|
match sizing {
|
||||||
Sizing::Increase => {
|
Sizing::Increase => {
|
||||||
custom.set_primary_width_percentage(percentage + 5.0);
|
custom
|
||||||
|
.set_primary_width_percentage(percentage + 5.0);
|
||||||
}
|
}
|
||||||
Sizing::Decrease => {
|
Sizing::Decrease => {
|
||||||
custom.set_primary_width_percentage(percentage - 5.0);
|
custom
|
||||||
|
.set_primary_width_percentage(percentage - 5.0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,12 +309,20 @@ impl WindowManager {
|
|||||||
match direction {
|
match direction {
|
||||||
OperationDirection::Left => {
|
OperationDirection::Left => {
|
||||||
if monitor.size().left + monitor.size().right == current_monitor_size.left {
|
if monitor.size().left + monitor.size().right == current_monitor_size.left {
|
||||||
|
if current_monitor_size.top > monitor.size().bottom {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
return Option::from(idx);
|
return Option::from(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OperationDirection::Right => {
|
OperationDirection::Right => {
|
||||||
if current_monitor_size.right + current_monitor_size.left == monitor.size().left
|
if current_monitor_size.right + current_monitor_size.left == monitor.size().left
|
||||||
{
|
{
|
||||||
|
if current_monitor_size.top > monitor.size().bottom {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
return Option::from(idx);
|
return Option::from(idx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user