summaryrefslogtreecommitdiff
path: root/src/gui/widgets/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/widgets/window.cpp')
-rw-r--r--src/gui/widgets/window.cpp7
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)
{