~townsend/compiz/fix-auto-vp-switch-0.9.10

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Sami Jaktholm
  • Date: 2013-07-21 19:43:01 UTC
  • mfrom: (3759.3.1 fix-1090713)
  • Revision ID: tarmac-20130721194301-tcdrx1rz0ppjyi0h
Expo: Recompute glow quads if a desktop window is resized.

(LP: #1090713). Fixes: https://bugs.launchpad.net/bugs/1090713.

Approved by PS Jenkins bot, MC Return, Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include "expo.h"
29
29
#include "click-threshold.h"
30
30
#include "wall-offset.h"
 
31
#include <core/logmessage.h>
31
32
#include <math.h>
32
33
#ifndef USE_GLES
33
34
#include <GL/glu.h>
1500
1501
    return cWindow->damageRect (initial, rect);
1501
1502
}
1502
1503
 
 
1504
void
 
1505
ExpoWindow::resizeNotify (int dx, int dy, int dwidth, int dheight)
 
1506
{
 
1507
    window->resizeNotify (dx, dy, dwidth, dheight);
 
1508
 
 
1509
    if (!(window->type () & CompWindowTypeDesktopMask))
 
1510
    {
 
1511
        compLogMessage ("expo", CompLogLevelWarn, "Received a resizeNotify "\
 
1512
                                                  "for a non-desktop window.");
 
1513
        assert (window->type () & CompWindowTypeDesktopMask);
 
1514
        return;
 
1515
    }
 
1516
 
 
1517
    /* Desktop window was resized. Update our glowQuads. */
 
1518
    foreach (GLTexture *tex, eScreen->outline_texture)
 
1519
    {
 
1520
        GLTexture::Matrix mat = tex->matrix ();
 
1521
        computeGlowQuads (&mat);
 
1522
    }
 
1523
}
 
1524
 
1503
1525
#define EXPOINITBIND(opt, func)                                \
1504
1526
    optionSet##opt##Initiate (boost::bind (&ExpoScreen::func,  \
1505
1527
                                           this, _1, _2, _3));
1572
1594
    mGlowQuads  (NULL),
1573
1595
    expoOpacity (1.0f)
1574
1596
{
 
1597
    WindowInterface::setHandler (window, false);
1575
1598
    CompositeWindowInterface::setHandler (cWindow, false);
1576
1599
    GLWindowInterface::setHandler (gWindow, false);
1577
1600
 
1582
1605
            GLTexture::Matrix mat = tex->matrix ();
1583
1606
            computeGlowQuads (&mat);
1584
1607
        }
 
1608
 
 
1609
        window->resizeNotifySetEnabled (this, true);
1585
1610
    }
1586
1611
}
1587
1612