[Wayland-bugs] [Bug 695945] implement minimize / maximize functionality

gtk+ (bugzilla.gnome.org) bugzilla at gnome.org
Tue Mar 19 08:53:31 PDT 2013


https://bugzilla.gnome.org/show_bug.cgi?id=695945
  gtk+ | wayland | unspecified

--- Comment #13 from Scott Moreau <oreaus at gmail.com> 2013-03-19 15:53:25 UTC ---
(In reply to comment #12)
> Hi Scott, i'm sorry that the patch doesn't represent your intentions. In future
> when making changes to your patches i'll post them for review by yourself prior
> to including them in the tree. Your work is of course appreciated which is why
> I preserved your credit on the change.

Yea, I was under the impression you'd actually make it work correctly but also
use your name for the patch.. it's not too important really.

> 
> On the point of using the same saved values for maximised as fullscreen I think
> a more complex solution is probably required.
> 
> We can picture some transitions like:
> 
> normal -> maximised -> fullscreen -> fullscreen -> maximised -> normal
> 
> or should we go fullscreen -> normal

I just solved this for xwayland (testing with google-chrome). IMHO it should
preserve the states as closely as the user put them. It should do normal ->
maximised -> fullscreen -> fullscreen -> maximised -> normal, which is what X
does but also xwayland too now that xwayland has maximize support. What I did
for xwayland is:

1) saved_width/height are used for both fullscreen and maximize
2) I found a bug when doing normal -> maximized -> toggle CSD in google-chrome
settings -> fullscreen -> unfullscreen -> unmaximize -> correct expected
original size (normal). The problem was the saved_width/height are being reset
on CSD toggle, so we're going to add a saved_size_valid var like weston's shell
plugin has with saved_x/y and saved_position_valid. The variables are used for
fullscreen and maximize.

> 
> We definitely need to preserve two sets of dimensions,

No, you do not. This is not the way it works with X and I'm not sure why you
would think this. You can reuse the variables for both fullscreen and maximize.
See
https://github.com/soreau/weston/commit/d471441b7e7b8c71ca37398f354873bcd3a38a80
for possible reference and saved_x/y usage in shell plugin.

> but also probably need
> to consider that if we have been previously maximised and then fullscreened
> should we restore to maximised state (setting dimensions and calling
> wl_shell_surface_set_maximized) or should we go straight to the "normal" window
> mode.

You should never do nomral -> maximize -> fullscreen -> normal. This does not
make a bit of sense and I'm not sure I know of an implementation that does this
(google-chrome and any terminal, possibly any fullscree-capable app).

> 
> This is conflated by the (hopefully soon) inclusion of the new events on
> shell_surface.

Yes, wl_shell* wont last forever. I'm kinda surprised by your question here, it
seems like a trick question. I expect someone of your position to know the
answer to this one since it's plainly obvious by existing behavior and common
sense. Your course of thought here is a bit puzzling.

- Scott

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the Wayland-bugs mailing list