GNOME Bugzilla – Bug 758876
Wayland: top header bar not visible in fullscreen
Last modified: 2015-12-10 14:27:44 UTC
On wayland the video has its own subsurface. It is directly painted by the compositor on top of Totem's main window. As a result on wayland the top header bar in not visible in fullscreen mode. To solve this issue, we can embed the top header bar in the video widget. This solves an issue this issue nicely by having the same behavior on X11 and Wayland.
Created attachment 316561 [details] [review] backend: embed the fullscreen top header bar in the video widget
Adding Andreas who filed https://bugzilla.gnome.org/show_bug.cgi?id=758563 initially.
Created attachment 316562 [details] [review] backend: embed the fullscreen top header bar in the video widget On wayland the video has its own subsurface. It is directly painted by the compositor on top of Totem's main window. As a result on wayland the top header bar is not visible in fullscreen mode. To solve this issue, we can embed the top header bar in the video widget. This solves this issue nicely by having the same behavior on X11 and Wayland.
Seems to work well on my system!
Created attachment 316587 [details] fullscreen screenshot For some reason, the text goes all blurry when I go to fullscreen
Comment on attachment 316587 [details] fullscreen screenshot hups, that was the non-fullscreen screenshot
Created attachment 316588 [details] fullscreen screenshot For some reason the text goes all blurry on fullscreen.
Created attachment 316589 [details] non-fullscreen screenshot for comparision
Interestingly the bottom controls seem blurry too.
Is you test on a hidpi display?
(In reply to Lionel Landwerlin from comment #10) > Is you test on a hidpi display? Yes. 3200x1800 on a 13" monitor.
Right this is a problem with the offscreen surfaces allocated at the unscaled size (so half the size) and then stretched out. This is an issue in clutter-gtk (which I'll fix) but also in GTK+, you can notice the blurriness in the Offscreen examples of gtk-demo.
(In reply to Lionel Landwerlin from comment #12) > Right this is a problem with the offscreen surfaces allocated at the > unscaled size (so half the size) and then stretched out. > This is an issue in clutter-gtk (which I'll fix) but also in GTK+, you can > notice the blurriness in the Offscreen examples of gtk-demo. Should I file a separate bug about it?
Yeah, this is mostly a demo bug I think.
Created attachment 316636 [details] [review] backend: embed the fullscreen top header bar in the video widget On wayland the video has its own subsurface. It is directly painted by the compositor on top of Totem's main window. As a result on wayland the top header bar is not visible in fullscreen mode. To solve this issue, we can embed the top header bar in the video widget. This solves this issue nicely by having the same behavior on X11 and Wayland.
If you apply all the dependencies (Gtk+ -> Clutter-Gtk -> Totem) it should work nicely on both X11 & Wayland. No blur!
(In reply to Lionel Landwerlin from comment #16) > If you apply all the dependencies (Gtk+ -> Clutter-Gtk -> Totem) it should > work nicely on both X11 & Wayland. No blur! Yup! That did the trick!
All dependencies are pushed to master. Just waiting for the review here :)
Review of attachment 316636 [details] [review]: Can you also bump the requirements in configure.ac as needed? Thanks for all the work. ::: src/backend/bacon-video-widget.c @@ +772,3 @@ { guint8 opacity = visible ? OVERLAY_OPACITY : 0; + gint height; header_controls_height @@ +773,3 @@ guint8 opacity = visible ? OVERLAY_OPACITY : 0; + gint height; + gfloat position; header_controls_y @@ +784,3 @@ * controls to redraw, so let's change the opacity instead */ clutter_actor_set_easing_duration (bvw->priv->controls, animate ? 250 : 0); + clutter_actor_set_easing_duration (bvw->priv->header_controls, animate ? 250 : 0); I'd rather a: duration = animate ? 250 : 0; and then calls to set_easing_duration with that temporary duration. @@ +6301,3 @@ + **/ +gboolean +bacon_video_widget_get_fullscreen (BaconVideoWidget *bvw) This isn't actually used, is it? Best remove it if unneeded. ::: src/totem-object.c @@ +3982,3 @@ + window = gtk_widget_get_window (totem->win); + bacon_video_widget_set_fullscreen (totem->bvw, + window && ((gdk_window_get_state (window) & GDK_WINDOW_STATE_FULLSCREEN) != 0)); Use a temporary variable here.
Created attachment 317098 [details] [review] backend: embed the fullscreen top header bar in the video widget On wayland the video has its own subsurface. It is directly painted by the compositor on top of Totem's main window. As a result on wayland the top header bar is not visible in fullscreen mode. To solve this issue, we can embed the top header bar in the video widget. This solves this issue nicely by having the same behavior on X11 and Wayland.
What dependency are you talking about?
(In reply to Lionel Landwerlin from comment #21) > What dependency are you talking about? GTK+ and clutter-gtk patches were committed for this bug, weren't they?
R(In reply to Bastien Nocera from comment #22) > (In reply to Lionel Landwerlin from comment #21) > > What dependency are you talking about? > > GTK+ and clutter-gtk patches were committed for this bug, weren't they? Right, but they're not API changes, just bug fixes. You still want those versions as dependency?
(In reply to Lionel Landwerlin from comment #23) > R(In reply to Bastien Nocera from comment #22) > > (In reply to Lionel Landwerlin from comment #21) > > > What dependency are you talking about? > > > > GTK+ and clutter-gtk patches were committed for this bug, weren't they? > > Right, but they're not API changes, just bug fixes. > You still want those versions as dependency? Yes please. Both should be released as stable when 3.20 is released.
Created attachment 317119 [details] [review] backend: embed the fullscreen top header bar in the video widget On wayland the video has its own subsurface. It is directly painted by the compositor on top of Totem's main window. As a result on wayland the top header bar is not visible in fullscreen mode. To solve this issue, we can embed the top header bar in the video widget. This solves this issue nicely by having the same behavior on X11 and Wayland.
Review of attachment 317119 [details] [review]: Looks great, thanks a lot for your help.
Review of attachment 317119 [details] [review]: Pushed to master.