Skip to content

Commit

Permalink
Fix double click on rotated display
Browse files Browse the repository at this point in the history
A double-click outside the device content (in the black borders) resizes
so that black borders are removed. But the display rotation was not
taken into account to detect the content.

Use the content size instead of the frame size to fix the issue.

Ref: <#898 (comment)>
  • Loading branch information
rom1v committed Apr 8, 2020
1 parent 6295c1a commit 9f4735e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,8 +543,8 @@ input_manager_process_touch(struct input_manager *im,
static bool
is_outside_device_screen(struct input_manager *im, int x, int y)
{
return x < 0 || x >= im->screen->frame_size.width ||
y < 0 || y >= im->screen->frame_size.height;
return x < 0 || x >= im->screen->content_size.width ||
y < 0 || y >= im->screen->content_size.height;
}

static bool
Expand Down

0 comments on commit 9f4735e

Please sign in to comment.