aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk
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
commitdfd3ae75aba38d6729e933a45559ee98bf2fb05e (patch)
tree03a332e1e21d65bc6f8f10bf417bc9436c063399 /gtk
parentbc14dd7e3b7210991b157a5d0dd30b81240e342a (diff)
downloadscintilla-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.
Diffstat (limited to 'gtk')
-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;