Fix edge detection for borders in vert/horz layouts

This commit is contained in:
Kovid Goyal
2026-03-02 11:04:09 +05:30
parent dc4cf8280d
commit 68d1a336fe
2 changed files with 3 additions and 1 deletions

View File

@@ -50,7 +50,7 @@ def borders(
color = BorderColor.inactive
if needs_borders_map.get(wg.id):
color = BorderColor.active if wg is active_group else BorderColor.bell
borders.append(BorderLine(e1, color, wg.active_window_id))
borders.append(BorderLine(e1, color, -wg.active_window_id))
borders.append(BorderLine(e2, color, wg.active_window_id))
last_idx = len(borders) - 1 - end_offset

View File

@@ -1212,11 +1212,13 @@ mouse_event(const int button, int modifiers, int action) {
if (global_state.active_drag_resize) {
if (button < 0) {
call_boss(drag_resize_update, "dd", osw->mouse_x, osw->mouse_y);
debug("drag resize updated\n");
} else if (button == GLFW_MOUSE_BUTTON_LEFT && action == GLFW_RELEASE) {
call_boss(drag_resize_end, "");
global_state.active_drag_resize = 0;
mouse_cursor_shape = DEFAULT_POINTER;
set_mouse_cursor(mouse_cursor_shape);
debug("drag resize ended\n");
}
return;
}