tests/cursor-tests: Also test a couple of fractional scales

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3859>
This commit is contained in:
Jonas Ådahl 2024-11-20 21:06:31 +01:00 committed by Sebastian Wick
parent 35cbea59cc
commit 3d45345789
6 changed files with 15 additions and 6 deletions

View File

@ -311,6 +311,14 @@ meta_test_native_cursor_scaling (void)
.width = 1920, .height = 1080, .scale = 2.0,
.layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_PHYSICAL,
},
{
.width = 1440, .height = 900, .scale = 1.5,
.layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL,
},
{
.width = 1440, .height = 900, .scale = 2.25,
.layout_mode = META_LOGICAL_MONITOR_LAYOUT_MODE_LOGICAL,
},
};
int i;

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

View File

@ -1044,12 +1044,13 @@ meta_wayland_surface_commit (MetaWaylandSurface *surface)
wl_client_get_credentials (wl_resource_get_client (resource), &pid, NULL,
NULL);
g_warning ("Bug in client with pid %ld: Cursor buffer size (%dx%d) is "
"not an integer multiple of the buffer_scale (%d).",
(long) pid,
meta_multi_texture_get_width (committed_texture),
meta_multi_texture_get_height (committed_texture),
committed_scale);
meta_topic (META_DEBUG_WAYLAND,
"Bug in client with pid %ld: Cursor buffer size (%dx%d) is "
"not an integer multiple of the buffer_scale (%d).",
(long) pid,
meta_multi_texture_get_width (committed_texture),
meta_multi_texture_get_height (committed_texture),
committed_scale);
}
}
}