diff options
author | Sravan Kumar Lakkimsetti | 2014-10-07 06:13:24 +0000 |
---|---|---|
committer | Sravan Kumar Lakkimsetti | 2014-10-07 11:15:21 +0000 |
commit | 5630a091774a79a8abc13251bc46b8a2be1f6f8c (patch) | |
tree | c504db5620b315da6d733a0efbbf725d7c0b06de | |
parent | 04d7ebfdfd98080a24f3b95bb7c8bc90e1ebf9c4 (diff) | |
download | eclipse.platform.swt-5630a091774a79a8abc13251bc46b8a2be1f6f8c.tar.gz eclipse.platform.swt-5630a091774a79a8abc13251bc46b8a2be1f6f8c.tar.xz eclipse.platform.swt-5630a091774a79a8abc13251bc46b8a2be1f6f8c.zip |
Bug 435948 "pixman_region32_init_rect: Invalid rectangle passed" onv4507fI20141007-0800
StyledText#setTopIndex(1)/scroll
Change-Id: Ib154c1ecb282564956254a2e8799608e0ef59c4f
Signed-off-by: Sravan Kumar Lakkimsetti <sravankumarl@in.ibm.com>
4 files changed, 12 insertions, 12 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java index 9107e15d96..3a58669054 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/graphics/GC.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -609,8 +609,8 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d if (disjoint) { rect.x = srcX; rect.y = srcY; - rect.width = width; - rect.height = height; + rect.width = Math.max (0, width); + rect.height = Math.max (0, height); OS.gdk_window_invalidate_rect (drawable, rect, false); // OS.gdk_window_clear_area_e(drawable, srcX, srcY, width, height); } else { @@ -620,7 +620,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d rect.x = newX; rect.y = srcY; rect.width = Math.abs(deltaX); - rect.height = height; + rect.height = Math.max (0, height); OS.gdk_window_invalidate_rect (drawable, rect, false); // OS.gdk_window_clear_area_e(drawable, newX, srcY, Math.abs(deltaX), height); } @@ -629,7 +629,7 @@ public void copyArea(int srcX, int srcY, int width, int height, int destX, int d if (deltaY < 0) newY = destY + height; rect.x = srcX; rect.y = newY; - rect.width = width; + rect.width = Math.max (0, width); rect.height = Math.abs(deltaY); OS.gdk_window_invalidate_rect (drawable, rect, false); // OS.gdk_window_clear_area_e(drawable, srcX, newY, width, Math.abs(deltaY)); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java index 24a88c6522..2919e2f7ba 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java @@ -3773,8 +3773,8 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole } else { rect.x = x; rect.y = y; - rect.width = width; - rect.height = height; + rect.width = Math.max (0, width); + rect.height = Math.max (0, height); } OS.gdk_window_invalidate_rect (window, rect, all); } diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java index 5062a8dfa9..4d6ddd4d63 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java @@ -819,8 +819,8 @@ long /*int*/ checkIfEventProc (long /*int*/ display, long /*int*/ xEvent, long / case OS.GraphicsExpose: { flushRect.x = exposeEvent.x; flushRect.y = exposeEvent.y; - flushRect.width = exposeEvent.width; - flushRect.height = exposeEvent.height; + flushRect.width = Math.max (0, exposeEvent.width); + flushRect.height = Math.max (0, exposeEvent.height); OS.gdk_window_invalidate_rect (window, flushRect, true); exposeEvent.type = -1; OS.memmove (xEvent, exposeEvent, XExposeEvent.sizeof); diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java index a3de27e2cf..1506dee206 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Scrollable.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -401,8 +401,8 @@ void redrawWidget (int x, int y, int width, int height, boolean redrawAll, boole OS.gtk_widget_translate_coordinates (paintHandle, topHandle, x, y, destX, destY); rect.x = destX [0]; rect.y = destY [0]; - rect.width = width; - rect.height = height; + rect.width = Math.max (0, width); + rect.height = Math.max (0, height); } OS.gdk_window_invalidate_rect (window, rect, all); } |