aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2015-08-06 09:54:32 +1000
committerNeil <nyamatongwe@gmail.com>2015-08-06 09:54:32 +1000
commitc608880843476d2c83796d186ffc76a2c67aea6c (patch)
tree51115e0e32dface64690e8c2434d37106e1f3ce1
parentfa855919575d5dc71d93682ded1a9e5ebf8dfb6a (diff)
downloadscintilla-mirror-c608880843476d2c83796d186ffc76a2c67aea6c.tar.gz
Bug [#1743]. Never report the client rectangle as having a negative width or
height as this causes "Invalid rectangle passed" warning messages.
-rw-r--r--gtk/ScintillaGTK.cxx4
1 files changed, 4 insertions, 0 deletions
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;