From dfd3ae75aba38d6729e933a45559ee98bf2fb05e Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 6 Aug 2015 09:54:32 +1000 Subject: Bug [#1743]. Never report the client rectangle as having a negative width or height as this causes "Invalid rectangle passed" warning messages. --- gtk/ScintillaGTK.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gtk') diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx index c60554a23..0c96d6024 100644 --- a/gtk/ScintillaGTK.cxx +++ b/gtk/ScintillaGTK.cxx @@ -1211,6 +1211,10 @@ PRectangle ScintillaGTK::GetClientRectangle() const { // Move to origin rc.right -= rc.left; rc.bottom -= rc.top; + if (rc.bottom < 0) + rc.bottom = 0; + if (rc.right < 0) + rc.right = 0; rc.left = 0; rc.top = 0; return rc; -- cgit v1.2.3