From 917fd3661ab9169dda3ea5797961d5bf4324dcbd Mon Sep 17 00:00:00 2001 From: corentin-soriano Date: Wed, 5 Jun 2024 09:20:54 +0200 Subject: [PATCH] GUACAMOLE-1944: display margin only affects the default layer and not scrollbar layer --- src/terminal/terminal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/terminal/terminal.c b/src/terminal/terminal.c index 83ac15dfd..d4f378dce 100644 --- a/src/terminal/terminal.c +++ b/src/terminal/terminal.c @@ -1881,10 +1881,6 @@ static void guac_terminal_double_click(guac_terminal* terminal, int row, int col static int __guac_terminal_send_mouse(guac_terminal* term, guac_user* user, int x, int y, int mask) { - /* Remove display margin from mouse position without going below 0 */ - y = y >= term->display->margin ? y - term->display->margin : 0; - x = x >= term->display->margin ? x - term->display->margin : 0; - /* Ignore user input if terminal is not started */ if (!term->started) { guac_client_log(term->client, GUAC_LOG_DEBUG, "Ignoring user input " @@ -1914,6 +1910,10 @@ static int __guac_terminal_send_mouse(guac_terminal* term, guac_user* user, } + /* Remove display margin from mouse position without going below 0 */ + y = y >= term->display->margin ? y - term->display->margin : 0; + x = x >= term->display->margin ? x - term->display->margin : 0; + term->mouse_mask = mask; /* Show mouse cursor if not already shown */