From 964ffbb9b6ed5246b14a7d0c0d065f7d38af0912 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 27 Mar 2011 21:41:20 +0300 Subject: Fix some warnings and improve code from gcc 4.6 compilation. --- src/gui/widgets/window.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/gui/widgets/window.cpp') 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(mTitleBarHeight) || (y < static_cast(getPadding()) && mTitleBarHeight > getPadding()))) { - const int x = event.getX(); + const unsigned x = event.getX(); if (!getWindowArea().isPointInRect(x, y) && event.getSource() == this) { -- cgit v1.2.3-60-g2f50