Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GUACAMOLE-1944: display margin only affects the default layer and not scrollbar layer #522

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/terminal/terminal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand Down Expand Up @@ -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 */
Expand Down
Loading