~ps-jenkins/compiz/latestsnapshot-10.9.10+13.10.20131004-0ubuntu1

« back to all changes in this revision

Viewing changes to plugins/expo/src/expo.cpp

  • Committer: Tarmac
  • Author(s): Sami Jaktholm
  • Date: 2013-07-09 02:26:13 UTC
  • mfrom: (3753.4.1 fix-438580)
  • Revision ID: tarmac-20130709022613-b70zjgq398gb3txp
Expo: Cast denominators of integer divisions to floats before performing a
      matrix translation to viewports with the results. Otherwise rounding
      errors in cases the results are not an integers cause the viewports to
      be painted offscreen. Fixes: https://bugs.launchpad.net/bugs/438580.

Approved by PS Jenkins bot, MC Return.

Show diffs side-by-side

added added

removed removed

Lines of Context:
957
957
 
958
958
            sTransform3 = sTransform2;
959
959
 
960
 
            sTransform3.translate ( output->x () / output->width (),
961
 
                                   -output->y () / output->height (), 0.0);
 
960
            sTransform3.translate ( output->x () / static_cast <float> (output->width ()),
 
961
                                   -output->y () / static_cast <float> (output->height ()), 0.0);
962
962
 
963
963
            cScreen->setWindowPaintOffset ((screen->vp ().x () - i) *
964
964
                                           screen->width (),