Code review comment for lp:~vanvugt/compiz/fix-751605

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

> > b) Allow maximization of windows when they are already on the monitor that
> > they can be maximized on (though this could be a little tricky to implement
> -
> > and could look a bit weird if a window suddenly gains a maximize button as a
> > result of moving it between the monitors)
>
> I cannot notice a problem with making a window smaller when maximizing it. We
> should make sure though that the size gets correctly restored afterwards
> (which is not happening in all cases, but that is another story...)

The problem with ignoring the size hint is that applications don't expect that, and there's a good chance that you'll break them. I tried hacking it to make it ignore the size hints for gtk windows and what happens is that gtk starts asserting like crazy and drawing widgets on top of each other. You really have to obey what the application tells you.

>
> > c) Display the grid preview in the place where the window is about to go.
> >
>
> This should always be the case, but it would feel strange if I want to
> activate the grid on the smaller monitor and the preview shows me it would go
> fullscreen on the larger one...

I agree, which is why I was hesitant to mention it. However for the reason I outlined below (eg, you can't fit a big thing into a small space, its impossible), I think it is the lesser of two evils rather than having this undefined behaviour where a large window occupies a small space.

>
> > Is it possible that we can consider those alternatives? Trust me - if you've
> > ever seen what happens when you maximize a window to a smaller size then its
> > minimize size the result is really really bad.
>
> You can easily test what happens then by creating a window larger than your
> largest monitor's x and y resolution and then maximize it on your smaller
> monitor (via grid for example). I cannot notice anything bad...

The main problem I'm trying to outline is where the window has a /minimum size/ that is larger in any dimention than the monitor that it is on. Try it with ccsm and a resolution of 640x480, and you'll see that the maximized window is actually larger than the monitor and some of it is inaccessible as a result (though thankfully the titlebar is accessible).

Making a window that has no minimum size, or a minimum size smaller than the size of the monitor larger than the monitor and then maximizing it isn't a problem here and hasn't been a problem.

There are some cases where doing exactly what the user specifies gets them into a broken experience. We should avoid that.

« Back to merge proposal