GNOME Bugzilla – Bug 755245
only shows a 4th of the screen under wayland
Last modified: 2015-11-23 11:03:54 UTC
It seems like only a 4th of the screen is shown when running under wayland. Monitor is hidpi, so might be why.
Does examples/video-player in clutter-gst's sources show the same problem?
I'm not quite sure if I'm running it wrong or something, but with the examples/video-player I just get a black window.
Created attachment 315859 [details] clutter-gst video-player didn't manage to get video, but the audio playback-thing seems to display only a quarter
So, yes, same behavior in video-player
Alright, then it's a clutter-gst problem...
Created attachment 316050 [details] [review] gdk: take into account scaling on wayland The X11 part of the GDK backend takes into account the scaling factor of its window when resizing the underlying X11 objects. We need to do the same for Wayland.
Mutter has an a great debug environment variable to test this (which I used). It would be nice to have this tested by somebody with an actual hidpi display :) Thanks!
Review of attachment 316050 [details] [review]: It does look okay to me, even without a testing environment. ::: clutter/gdk/clutter-stage-gdk.c @@ +123,3 @@ ClutterStageGdk *stage_gdk = CLUTTER_STAGE_GDK (stage_window); + if (stage_gdk->window != NULL) Care to explain why you changed this?
(In reply to Lionel Landwerlin from comment #7) > Mutter has an a great debug environment variable to test this (which I used). > It would be nice to have this tested by somebody with an actual hidpi > display :) > Thanks! I'm happy to test it. Do I just need to apply the patch to clutter, rebuild and test in totem and video-player?
Yep.
Review of attachment 316050 [details] [review]: ::: clutter/gdk/clutter-stage-gdk.c @@ +123,3 @@ ClutterStageGdk *stage_gdk = CLUTTER_STAGE_GDK (stage_window); + if (stage_gdk->window != NULL) I don't think asking the geometry to the ClutterStageCogl is appropriate, because it's not aware of the scaling for example. Last time I touched this function, I left the non foreign window case as it, but now I think we should always rely on the GdkWindow's information. Clutter-Gtk should always put us in the right place : https://git.gnome.org/browse/clutter-gtk/tree/clutter-gtk/gtk-clutter-embed.c#n686 I'll update the patch to do this : if (stage_gdk->window != NULL) { geometry->width = gdk_window_get_width (stage_gdk->window); geometry->height = gdk_window_get_height (stage_gdk->window); } else { geometry->width = 640; geometry->height = 480; }
Created attachment 316059 [details] [review] gdk: take into account scaling on wayland The X11 part of the GDK backend takes into account the scaling factor of its window when resizing the underlying X11 objects. We need to do the same for Wayland.
Yup! This fixed the issue on my laptop. Thanks for the super-quick patch!
Review of attachment 316059 [details] [review]: Looks good.
Review of attachment 316059 [details] [review]: Pushed to master.