corentin-soriano commented on code in PR #509:
URL: https://github.com/apache/guacamole-server/pull/509#discussion_r1567423112


##########
src/terminal/terminal.c:
##########
@@ -1801,8 +1801,8 @@ static int __guac_terminal_send_mouse(guac_terminal* 
term, guac_user* user,
      * pressed */
     else if (mask & GUAC_CLIENT_MOUSE_LEFT) {
 
-        int row = y / term->display->char_height - term->scroll_offset;
-        int col = x / term->display->char_width;
+        int row = (y - term->display->margin) / term->display->char_height - 
term->scroll_offset;
+        int col = (x - term->display->margin) / term->display->char_width;

Review Comment:
   Yes, if the mouse ends up in the top or left margin, we treat it as if it 
were at the inner edge.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to