necouchman commented on code in PR #509:
URL: https://github.com/apache/guacamole-server/pull/509#discussion_r1567170826
##########
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:
Are there any corner cases - sorry for the bad pun - where the values of `x`
and `y` would be so small that the result of `(y - term->display->margin)`
would end up being negative? Asked another way, does this code behave as
expected at the left-most column and the top of the screen?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]