diff options
author | Neil <nyamatongwe@gmail.com> | 2015-08-06 09:54:32 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2015-08-06 09:54:32 +1000 |
commit | dfd3ae75aba38d6729e933a45559ee98bf2fb05e (patch) | |
tree | 03a332e1e21d65bc6f8f10bf417bc9436c063399 | |
parent | bc14dd7e3b7210991b157a5d0dd30b81240e342a (diff) | |
download | scintilla-mirror-dfd3ae75aba38d6729e933a45559ee98bf2fb05e.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.cxx | 4 |
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; |