Skip to content

Commit 1298b57

Browse files
authored
Fix cursor hotspot for scale factors different than 1 (sony#311)
Signed-off-by: Valentin Hăloiu <[email protected]>
1 parent 2790806 commit 1298b57

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/flutter/shell/platform/linux_embedded/window/elinux_window_wayland.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,9 +1274,9 @@ void ELinuxWindowWayland::UpdateFlutterCursor(const std::string& cursor_name) {
12741274
auto image = wl_cursor->images[0];
12751275
auto buffer = wl_cursor_image_get_buffer(image);
12761276
if (buffer) {
1277-
wl_pointer_set_cursor(cursor_info_.pointer, cursor_info_.serial,
1278-
wl_cursor_surface_, image->hotspot_x,
1279-
image->hotspot_y);
1277+
wl_pointer_set_cursor(
1278+
cursor_info_.pointer, cursor_info_.serial, wl_cursor_surface_,
1279+
image->hotspot_x / current_scale_, image->hotspot_y / current_scale_);
12801280
wl_surface_attach(wl_cursor_surface_, buffer, 0, 0);
12811281
wl_surface_damage(wl_cursor_surface_, 0, 0, image->width, image->height);
12821282
wl_surface_set_buffer_scale(wl_cursor_surface_, current_scale_);

0 commit comments

Comments
 (0)