https://bugzilla.gnome.org/show_bug.cgi?id=783901

--- Comment #33 from Jonas Ådahl <jad...@gmail.com> ---
(In reply to Olivier Fourdan from comment #32)
> (In reply to Jonas Ådahl from comment #31)
> > Review of attachment 354148 [details] [review] [review]:
> > 
> > ::: src/wayland/meta-wayland-xdg-shell.c
> > @@ +355,3 @@
> > +      /* Make sure the position is up-to-date prior to call maximize */
> > +      window->rect.x = window->unconstrained_rect.x;
> > +      window->rect.y = window->unconstrained_rect.y;
> > 
> > This looks like its working around something in force_placement().
> 
> Well, it;s been a while since I wrote this patch, but I reckon this is not,
> actually.

The reason why I think it looks like this is that meta_window_force_placement()
will call meta_window_wayland_move_resize_internal() which conditionally will
set the window->rect.x/y. It seems to be that the condition should cover also
this case.

> 
> > Shouldn't we fix this in meta_window_wayland_move_resize_internal()? It
> > looks like we should be able to set "can_move_now" to TRUE if we are
> > "!placed" (which will be set to TRUE after the move resize call), or
> > possibly adding another MOVE_RESIZE flag "force" that forces the placement?
> 
> That wouldn't be the same as saving the x/y when maximizing from
> xdg_toplevel_set_maximized(), trying to address the issue in
> meta_window_wayland_move_resize_internal() would either place the window
> initially at 0/0 (thus defeating initial placement), or restore the location
> on the wrong output, or play the initial mapping animation on the wrong
> output (depending on which ig/then/else case we force "can_move_now" to
> TRUE) - Well at least from what I saw when trying to experimenting with
> that, but I could be wrong.

How so? What difference would it make to cause the
wayland_move_resize_internal() to save the rect.x/y compared to doing it
outside? I'd only ever immediately save the position with the exact same
conditions as in the attached patch, i.e. when not already placed before
maximizing (by adding the MOVE_RESIZE_FORCE flag).

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
wayland-bugs mailing list
wayland-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-bugs

Reply via email to