From 2f105505996510db2b462e15ef9c7cf77ab9bbb6 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Tue, 18 Jan 2005 14:55:34 +0000 Subject: Changed default depth to 32 and fixed window snapping by one pixel. --- src/gui/window.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/window.cpp') diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 1429830d..0c15ab97 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -219,14 +219,14 @@ void Window::mouseMotion(int mx, int my) // Keep guichan window inside window if (x < 0) x = 0; if (y < 0) y = 0; - if (x + winWidth > 799) x = 799 - winWidth; - if (y + winHeight > 599) y = 599 - winHeight; + if (x + winWidth > screen->w) x = screen->w - winWidth; + if (y + winHeight > screen->h) y = screen->h - winHeight; // Snap window to edges if (x < snapSize) x = 0; if (y < snapSize) y = 0; - if (x + winWidth + snapSize > 799) x = 799 - winWidth; - if (y + winHeight + snapSize > 599) y = 599 - winHeight; + if (x + winWidth + snapSize > screen->w) x = screen->w - winWidth; + if (y + winHeight + snapSize > screen->h) y = screen->h - winHeight; this->setPosition(x, y); } -- cgit v1.2.3-70-g09d2