dcb6083442a689d87769d427122c2cd3e1295bf2

Author
outfoxxed <outfoxxed@outfoxxed.me>
Committer
outfoxxed <outfoxxed@outfoxxed.me>
Date

Message

fix up+left resize directions

Diff

 1diff --git a/CHANGELOG.md b/CHANGELOG.md
 2index cb29335594fdd17c7097ba6e9b76bf1840b24d4b..4057b66b727e993836f78781e4505fd8ea953ba6 100644
 3--- a/CHANGELOG.md
 4+++ b/CHANGELOG.md
 5@@ -1,5 +1,9 @@
 6 # Changelog
 7 
 8+# Upcoming
 9+
10+- Fix mouse up+left mouse resize
11+
12 # hl0.56.0 and before
13 
14 - Only compatibility fixes.
15diff --git a/src/Hy3Layout.cpp b/src/Hy3Layout.cpp
16index dfbb21cbee92b955f13aa719635dbe2bbe654c0c..7f91608a20b5b1a41f5845b6f3c3df7362658f3b 100644
17--- a/src/Hy3Layout.cpp
18+++ b/src/Hy3Layout.cpp
19@@ -502,12 +502,8 @@ void Hy3Layout::resizeTarget(const Vector2D& delta, SP<Layout::ITarget> target,
20 		if (target_edge_x == ShiftDirection::Left) resize_delta.x = -resize_delta.x;
21 		if (target_edge_y == ShiftDirection::Up) resize_delta.y = -resize_delta.y;
22 	} else {
23-		target_edge_x = (corner & Layout::CORNER_TOPLEFT) || (corner & Layout::CORNER_BOTTOMLEFT)
24-		                  ? ShiftDirection::Left
25-		                  : ShiftDirection::Right;
26-		target_edge_y = (corner & Layout::CORNER_TOPLEFT) || (corner & Layout::CORNER_TOPRIGHT)
27-		                  ? ShiftDirection::Up
28-		                  : ShiftDirection::Down;
29+		target_edge_x = corner & Layout::CORNER_LEFT ? ShiftDirection::Left : ShiftDirection::Right;
30+		target_edge_y = corner & Layout::CORNER_TOP ? ShiftDirection::Up : ShiftDirection::Down;
31 	}
32 
33 	auto horizontal_neighbor = node->findNeighbor(target_edge_x);