[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [PATCH virt-viewer 4/4] window: keep window size when leaving auto-conf fullscreen

----- Mensaje original -----
> Hi,
> On 03/25/2013 10:32 PM, Marc-André Lureau wrote:
> > On Mon, Mar 25, 2013 at 10:26 PM, Marc-André Lureau
> > <marcandre lureau gmail com> wrote:
> >> +    if (virt_viewer_app_get_fullscreen_auto_conf(priv->app)) {
> >
> > Actually, I realize the bug is about all kind of fullscreen. My
> > reasoning was that auto-conf is a bit special because it tries it
> > best
> > to keep client monitor configuration, rather than obeying to window
> > manager constrains. But that distincition is a bit blurry nowadays.
> >
> > So we can decide to use app_get_fullscreen() instead here.
> I agree that the problem is with all kinds of fullscreen, but only
> when we start fullscreen. so we've no priv->before_saved and then
> we end up with the very small windows for all monitors.
> It seems wrong to me to always try to keep the fullscreen size /
> resolution when we leave fullscreen. I think restoring the size
> and position from before going fullscreen is the right thing to
> do. Except when there is no size / position to restore, and I
> believe that in that case it does make sense to keep the window
> sizes as they were in fullscreen mode.
> So how about:
>      if (priv->before_saved) {
>          ...
>      } else {
>          virt_viewer_display_queue_resize(priv->display);
>      }

That's ok, though we need to change the:

-    if (!priv->before_saved) {
+    if (gtk_widget_get_realized(priv->window)) {

Which seems a reasonable change.

Also, I don't think we should set back priv->before_saved = FALSE, as it contains valid value from then on. And setting it back to FALSE might end up to queue_resize() if we call leave_fullscreen() twice for some reason.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]