summaryrefslogtreecommitdiff
path: root/src/screen.cpp
diff options
context:
space:
mode:
authorErkin Bahceci <erkinbah@gmail.com>2009-07-30 19:41:38 -0500
committerErkin Bahceci <erkinbah@gmail.com>2009-07-30 19:41:38 -0500
commite234d8717fc54f6adf4e8fa74bd9929cc912eaf7 (patch)
tree075bc50d29463a5b3033dce2296bd16662aa874e /src/screen.cpp
parent955e5653053af15a7c7732558fa4a4b7dda4099d (diff)
downloadunity-window-decorator-e234d8717fc54f6adf4e8fa74bd9929cc912eaf7.tar.gz
unity-window-decorator-e234d8717fc54f6adf4e8fa74bd9929cc912eaf7.tar.bz2
More unsigned int to int conversion.
Diffstat (limited to 'src/screen.cpp')
-rw-r--r--src/screen.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/screen.cpp b/src/screen.cpp
index 86dacf5..cbd8ef8 100644
--- a/src/screen.cpp
+++ b/src/screen.cpp
@@ -1699,7 +1699,8 @@ PrivateScreen::updateOutputDevices ()
CompOption::Value::Vector &list = optionGetOutputs ();
unsigned int nOutput = 0;
int x, y, bits;
- unsigned int width, height;
+ unsigned int uWidth, uHeight;
+ int width, height;
int x1, y1, x2, y2;
char str[10];
@@ -1707,10 +1708,12 @@ PrivateScreen::updateOutputDevices ()
{
x = 0;
y = 0;
- width = screen->width ();
- height = screen->height ();
+ uWidth = (unsigned) screen->width ();
+ uHeight = (unsigned) screen->height ();
- bits = XParseGeometry (value.s ().c_str (), &x, &y, &width, &height);
+ bits = XParseGeometry (value.s ().c_str (), &x, &y, &uWidth, &uHeight);
+ width = (int) uWidth;
+ height = (int) uHeight;
if (bits & XNegative)
x = screen->width () + x - width;
@@ -1727,9 +1730,9 @@ PrivateScreen::updateOutputDevices ()
x1 = 0;
if (y1 < 0)
y1 = 0;
- if (x2 > (int) screen->width ())
+ if (x2 > screen->width ())
x2 = screen->width ();
- if (y2 > (int) screen->height ())
+ if (y2 > screen->height ())
y2 = screen->height ();
if (x1 < x2 && y1 < y2)
@@ -3773,12 +3776,12 @@ CompScreen::warpPointer (int dx,
pointerX += dx;
pointerY += dy;
- if (pointerX >= (int) width ())
+ if (pointerX >= width ())
pointerX = width () - 1;
else if (pointerX < 0)
pointerX = 0;
- if (pointerY >= (int) height ())
+ if (pointerY >= height ())
pointerY = height () - 1;
else if (pointerY < 0)
pointerY = 0;