GNOME Bugzilla – Bug 769190
Clutter stage is too big and events wrong under hidpi gnome on wayland
Last modified: 2021-06-10 11:34:06 UTC
Created attachment 332141 [details] Screenshot showing the problem Running Gnome on Wayland with a 3200x1800 screen, clutter stages are being scaled twice, it seems, while events seem to be scaled only once. tests/interactive/test-events is a good example of this. The screenshot shows how the window looks like when started under that environment. I marked the point where I have to click to highlight the red actor with a small pink circle. Starting the test with CLUTTER_BACKEND=wayland makes it be sized properly and events are also landing where they are supposed to. Same thing for the x11 backend. I tried this with clutter from master, this is under Fedora 24, GTK+ 3.20.6.
Created attachment 339280 [details] [review] gdk: Ensure surface buffer scale is set GDK will only set the buffer scale for the surfaces it creates when attaching an image or when using an egl window window. Neither will happen for native clutter applications, thus directly set the buffer scale from clutter in that case (so it's in sync with the rendering scale) Signed-off-by: Sjoerd Simons <sjoerd@luon.net>
Review of attachment 339280 [details] [review]: Looks okay. ::: clutter/gdk/clutter-stage-gdk.c @@ +232,3 @@ + + surface = gdk_wayland_window_get_wl_surface (stage_gdk->window); + wl_surface_set_buffer_scale (surface, It's unfortunate that gdk_wayland_window_get_wl_surface() does not return the surface with the appropriate buffer scale already — but I guess it's too late to change it, now.
Created attachment 354784 [details] [review] updated version of sjoerds patch Had to update sjoerds patch to make it apply on 1.26.2 again without fuzz. Since review was ok, someone might want to push this?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of clutter, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a ticket at https://gitlab.gnome.org/GNOME/clutter/-/issues/ Thank you for your understanding and your help.