diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-03-27 21:41:20 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-03-27 21:41:20 +0300 |
commit | 964ffbb9b6ed5246b14a7d0c0d065f7d38af0912 (patch) | |
tree | edef1b3f31183402e2d0f86ee48c9734c2a03c7e /src/gui/widgets/window.cpp | |
parent | 41ac086fcd38fd472b579a495a8e8e7685ae4722 (diff) | |
download | manaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.gz manaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.bz2 manaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.tar.xz manaverse-964ffbb9b6ed5246b14a7d0c0d065f7d38af0912.zip |
Fix some warnings and improve code from gcc 4.6 compilation.
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r-- | src/gui/widgets/window.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gui/widgets/window.cpp b/src/gui/widgets/window.cpp index 8c33b4787..1b008a087 100644 --- a/src/gui/widgets/window.cpp +++ b/src/gui/widgets/window.cpp @@ -768,14 +768,17 @@ void Window::resetToDefaultSize() int Window::getResizeHandles(gcn::MouseEvent &event) { + if (event.getX() < 0 || event.getY() < 0) + return 0; + int resizeHandles = 0; - const int y = event.getY(); + const unsigned y = event.getY(); if (mGrip && (y > static_cast<int>(mTitleBarHeight) || (y < static_cast<int>(getPadding()) && mTitleBarHeight > getPadding()))) { - const int x = event.getX(); + const unsigned x = event.getX(); if (!getWindowArea().isPointInRect(x, y) && event.getSource() == this) { |