summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDennis Kasprzyk <onestone@compiz-fusion.org>2008-10-14 16:57:49 +0200
committerDennis Kasprzyk <onestone@compiz-fusion.org>2008-10-14 16:57:49 +0200
commit43c133cfe495ac03683adb52cf77ed679be7b5e6 (patch)
tree6f24bfdfb8cc63fc1be333d4a6b02f1c52987ac9 /src
parentbb612a76f62e4ecfef9d90fa7d98c39b0e6c3766 (diff)
downloadunity-window-decorator-43c133cfe495ac03683adb52cf77ed679be7b5e6.tar.gz
unity-window-decorator-43c133cfe495ac03683adb52cf77ed679be7b5e6.tar.bz2
Made CompIcon derive from CompSize.
Diffstat (limited to 'src')
-rw-r--r--src/icon.cpp8
-rw-r--r--src/window.cpp4
2 files changed, 3 insertions, 9 deletions
diff --git a/src/icon.cpp b/src/icon.cpp
index aa17e35..0a8146b 100644
--- a/src/icon.cpp
+++ b/src/icon.cpp
@@ -29,7 +29,7 @@
CompIcon::CompIcon (CompScreen *screen, unsigned int width,
unsigned int height) :
- mSize (width, height),
+ CompSize (width, height),
mData (new unsigned char[width * height * 4])
{
}
@@ -39,12 +39,6 @@ CompIcon::~CompIcon ()
delete mData;
}
-const CompSize &
-CompIcon::size () const
-{
- return mSize;
-}
-
unsigned char*
CompIcon::data ()
{
diff --git a/src/window.cpp b/src/window.cpp
index 2437a6e..b890250 100644
--- a/src/window.cpp
+++ b/src/window.cpp
@@ -3714,7 +3714,7 @@ CompWindow::getIcon (int width, int height)
for (i = 0; i < priv->icons.size (); i++)
{
- const CompSize &iconSize = priv->icons[i]->size ();
+ const CompSize iconSize = *priv->icons[i];
if ((int) iconSize.width () > width ||
(int) iconSize.height () > height)
@@ -3723,7 +3723,7 @@ CompWindow::getIcon (int width, int height)
if (icon)
{
diff = wh - (iconSize.width () + iconSize.height ());
- oldDiff = wh - (icon->size ().width () + icon->size ().height ());
+ oldDiff = wh - (icon->width () + icon->height ());
if (diff < oldDiff)
icon = priv->icons[i];