[compiz] [PATCH] Resize improvements (Multiple resize modes, better aspect ratio constraining)

David Reveman davidr at novell.com
Mon Apr 23 07:41:10 PDT 2007


On Wed, 2007-04-18 at 10:45 +0200, Danny Baumann wrote:
> Hi,
> 
> > I have ported various improvements of Beryl's resize to Compiz:
> > 
> > - multiple resize modes (aside to the standard "normal" mode those are
> > "Stretch", "Outline" and "Filled Outline")
> > - better aspect ratio constraining (you now also can resize aspect
> > constrained windows from other edges than the lower right)
> > - avoiding of mouse pointer desynchronization when the resizing hit
> > constraints.
> > 
> > While porting this, I cleaned up the code and fixed some performance
> > problems, so the code is supposed to work without problems.
> > 
> > If you want to use the new options and are using gconf, you have to do
> > 'make compiz.schemas.in' in your plugin directory to update the schema
> > file.
> > 
> > Please tell me what you think of that patch and if you experience any
> > problems while using it.
> 
> I've splitted up the patch into several smaller ones, adapted them for
> latest API changes and fixed some minor bugs which I got reported.
> 
> Some more feedback would still be nice :-)
> 
> David, are there any objections against including this code?
> 
> Regards,

0001-Added-options-for-additional-resize-modes.patch - I think I'll just
leave this patch out and add these options once we converted the resize
plugin to use the new metadata system.

0002-Added-painting-code-for-additional-resize-modes.patch - I think we
want the paintWindow function to paint it's own instance of the window
like switcher and scale plugins are doing instead of transforming the
core instance. The outline drawing is OK.

0003-Update-resize-logic-to-reflect-additional-resize-mod.patch - I see
a lot of calls to damageScreen in this patch when damageScreenRegion
should be used in all those cases to avoid redrawing more than we need.
Motion events shouldn't cause the window to be move when resizing in
stretch-mode and rightEdge, bottomEdge variables can be removed once
that's changed.

0004-Added-proper-constraining-code.patch - I hope we can avoid
including all this code and instead improve the core constraint function
to solve any problems that currently exist. Can you provide some details
on how the constraining is not currently working properly in the resize
plugin so we can discuss how to best solve that?

0005-Warp-pointer-if-resizing-hit-constraints-to-avoid-mo.patch - I had
something similar to this in the resize plugin before but removed it as
it can't be done properly, it will always look bad as the cursor can
never be constrained perfectly. I'd like to avoid this completely.

0006-Added-screen-damages-which-were-missing-if-the-resiz.patch - Again,
damageScreen should never have to be called. You want to use
damageScreenRegion.

0007-Avoid-resizing-windows-to-negative-sizes.patch - The constrain size
code should be fixed to take care of this if it doesn't already.

0008-Avoid-window-flashing-back-to-its-old-size-for-a-sho.patch - Does
this have to be a special case? Can't we have the final size change
always be the indication that the resizing is done (not only for stretch
mode)?

- David



More information about the compiz mailing list