~ubuntu-dev/ubuntu/lucid/mutter/lucid-201002110959

« back to all changes in this revision

Viewing changes to src/core/constraints.c

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2009-08-10 19:00:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20090810190042-cg6drmydzek5gwbh
Tags: 2.27.1git090806-0ubuntu1
* New upstream release from git repositoy, using now clutter 1.0,
  needed for last GNOME shell.
* debian/control.in: build-dep on libclutter-1.0-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
700
700
 
701
701
      min_size->width  += fw;
702
702
      min_size->height += fh;
703
 
      max_size->width  += fw;
704
 
      max_size->height += fh;
 
703
      /* Do check to avoid overflow (e.g. max_size->width & max_size->height
 
704
       * may be set to G_MAXINT by meta_set_normal_hints()).
 
705
       */
 
706
      if (max_size->width < (G_MAXINT - fw))
 
707
        max_size->width += fw;
 
708
      else
 
709
        max_size->width = G_MAXINT;
 
710
      if (max_size->height < (G_MAXINT - fh))
 
711
        max_size->height += fh;
 
712
      else
 
713
        max_size->height = G_MAXINT;
705
714
    }
706
715
}
707
716