~lbrulet-8/compiz-plugins-main/fix-876591

« back to all changes in this revision

Viewing changes to ezoom/src/ezoom.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Didier Roche
  • Date: 2011-03-22 21:47:11 UTC
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20110322214711-ova37916nobmtxyc
Tags: upstream-0.9.4git20110322
ImportĀ upstreamĀ versionĀ 0.9.4git20110322

Show diffs side-by-side

added added

removed removed

Lines of Context:
565
565
void
566
566
EZoomScreen::areaToWindow (CompWindow *w)
567
567
{
568
 
    int left = w->serverX () - w->input ().left;
569
 
    int width = w->width () + w->input ().left + w->input ().right;
570
 
    int top = w->serverY () - w->input ().top;
571
 
    int height = w->height ()  + w->input ().top + w->input ().bottom;
 
568
    int left = w->serverX () - w->border ().left;
 
569
    int width = w->width () + w->border ().left + w->border ().right;
 
570
    int top = w->serverY () - w->border ().top;
 
571
    int height = w->height ()  + w->border ().top + w->border ().bottom;
572
572
 
573
573
    setZoomArea (left, top, width, height, false);
574
574
}
1528
1528
    w = screen->findWindow (xid);
1529
1529
    if (!w)
1530
1530
        return true;
1531
 
    width = w->width () + w->input ().left + w->input ().right;
1532
 
    height = w->height () + w->input ().top + w->input ().bottom;
 
1531
    width = w->width () + w->border ().left + w->border ().right;
 
1532
    height = w->height () + w->border ().top + w->border ().bottom;
1533
1533
    out = screen->outputDeviceForGeometry (w->geometry ());
1534
1534
    o = &screen->outputDevs ().at (out);
1535
1535
    setScaleBigger (out, (float) width/o->width (),
1599
1599
    xwc.y = w->serverY ();
1600
1600
    xwc.width = (int) (screen->outputDevs ().at (out).width () *
1601
1601
                       zooms.at (out).currentZoom -
1602
 
                       (int) ((w->input ().left + w->input ().right)));
 
1602
                       (int) ((w->border ().left + w->border ().right)));
1603
1603
    xwc.height = (int) (screen->outputDevs ().at (out).height () *
1604
1604
                        zooms.at (out).currentZoom -
1605
 
                        (int) ((w->input ().top + w->input ().bottom)));
 
1605
                        (int) ((w->border ().top + w->border ().bottom)));
1606
1606
 
1607
1607
    w->constrainNewWindowSize (xwc.width,
1608
1608
                               xwc.height,
1727
1727
        return;
1728
1728
    if (optionGetFocusFitWindow ())
1729
1729
    {
1730
 
        int width = w->width () + w->input ().left + w->input ().right;
1731
 
        int height = w->height () + w->input ().top + w->input ().bottom;
 
1730
        int width = w->width () + w->border ().left + w->border ().right;
 
1731
        int height = w->height () + w->border ().top + w->border ().bottom;
1732
1732
        float scale = MAX ((float) width/screen->outputDevs ().at(out).width (),
1733
1733
                           (float) height/screen->outputDevs ().at (out).height ());
1734
1734
        if (scale > optionGetAutoscaleMin ())