From 9326a7f00850fb8a3f450ae2b938780bc7c2fd87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Mon, 8 Dec 2003 12:50:32 +0000 Subject: [PATCH] Fix #69787 - off-by-one error when checking top position. CCMAIL: 69787-done@bugs.kde.org svn path=/trunk/kdebase/kwin/; revision=271907 --- geometry.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geometry.cpp b/geometry.cpp index b8f6929f83..5f8f79b82e 100644 --- a/geometry.cpp +++ b/geometry.cpp @@ -1712,8 +1712,8 @@ void Client::handleMoveResize( int x, int y, int x_root, int y_root ) // first move, then snap, then check bounds moveResizeGeom.moveTopLeft( topleft ); moveResizeGeom.moveTopLeft( workspace()->adjustClientPosition( this, moveResizeGeom.topLeft() ) ); - if( moveResizeGeom.bottom() < desktopArea.top() + titlebar_marge ) // titlebar mustn't go out - moveResizeGeom.moveBottom( desktopArea.top() + titlebar_marge ); + if( moveResizeGeom.bottom() <= desktopArea.top() + titlebar_marge ) // titlebar mustn't go out + moveResizeGeom.moveBottom( desktopArea.top() + titlebar_marge - 1 ); // no need to check top_marge, titlebar_marge already handles it if( moveResizeGeom.top() > desktopArea.bottom() - bottom_marge ) moveResizeGeom.moveTop( desktopArea.bottom() - bottom_marge );