From dc4cf8280de000c7c5c148d16908d7b7babe15ba Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 2 Mar 2026 10:58:40 +0530 Subject: [PATCH] ... --- kitty/mouse.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/kitty/mouse.c b/kitty/mouse.c index 130e930b3..0ef2e791c 100644 --- a/kitty/mouse.c +++ b/kitty/mouse.c @@ -1115,6 +1115,21 @@ mouse_selection(Window *w, int code, int button) { #undef S } +static const char* +border_name(int edges) { + switch(edges) { + case 0: return "none"; + case LEFT_EDGE: return "left"; + case RIGHT_EDGE: return "right"; + case TOP_EDGE: return "top"; + case BOTTOM_EDGE: return "bottom"; + case LEFT_EDGE | TOP_EDGE: return "top-left"; + case LEFT_EDGE | BOTTOM_EDGE: return "bottom-left"; + case RIGHT_EDGE | TOP_EDGE: return "top-right"; + case RIGHT_EDGE | BOTTOM_EDGE: return "bottom-right"; + } + return "unknown"; +} void mouse_event(const int button, int modifiers, int action) { @@ -1214,7 +1229,7 @@ mouse_event(const int button, int modifiers, int action) { handle_tab_bar_mouse(button, modifiers, action); debug("handled by tab bar\n"); } else if (window_border) { - debug("window border: %d window id: %llu\n", window_border, w ? w->id : 0); + debug("window border: %s window id: %llu\n", border_name(window_border), w ? w->id : 0); if (window_border & LEFT_EDGE) { if (window_border & TOP_EDGE) mouse_cursor_shape = NWSE_RESIZE_POINTER; else if (window_border & BOTTOM_EDGE) mouse_cursor_shape = NESW_RESIZE_POINTER;