aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSnjezana Peco2014-04-23 08:55:50 (EDT)
committerArun Thondapu2014-04-27 10:37:58 (EDT)
commit2e2d3d7e7fd5f8bc171072a54847a622718a17d1 (patch)
treedb2920d075a010bf94b7c428318a915be28197d2
parent0757bcaef9d164ab26c143786c6ed075b2af44ce (diff)
downloadeclipse.platform.swt-2e2d3d7e7fd5f8bc171072a54847a622718a17d1.zip
eclipse.platform.swt-2e2d3d7e7fd5f8bc171072a54847a622718a17d1.tar.gz
eclipse.platform.swt-2e2d3d7e7fd5f8bc171072a54847a622718a17d1.tar.bz2
Bug 421127 - form editor painting issuerefs/changes/11/25411/4
Change-Id: I44ba20e832e52903b28c23d62b7d574c7416e9e7 Signed-off-by: Snjezana Peco <snjeza.peco@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java9
1 files changed, 7 insertions, 2 deletions
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 7fac835..ec9a008 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
@@ -3165,8 +3165,8 @@ long /*int*/ gtk_draw (long /*int*/ widget, long /*int*/ cairo) {
if (OS.GTK_VERSION <= OS.VERSION(3, 9, 0)) {
data.cairo = cairo;
}
-
GC gc = event.gc = GC.gtk_new (this, data);
+ gc.setClipping(rect.x, rect.y, rect.width, rect.height);
drawWidget (gc);
sendEvent (SWT.Paint, event);
gc.dispose ();
@@ -5484,7 +5484,12 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
GdkRectangle rect = new GdkRectangle ();
OS.gdk_cairo_get_clip_rectangle (cairo, rect);
if (control == null) control = this;
- drawBackground (control, 0, cairo, 0, rect.x, rect.y, rect.width, rect.height);
+ long window = OS.gtk_widget_get_window(handle);
+ if (window != 0) {
+ drawBackground (control, window, 0, 0, rect.x, rect.y, rect.width, rect.height);
+ } else {
+ drawBackground (control, 0, cairo, 0, rect.x, rect.y, rect.width, rect.height);
+ }
} else {
GdkEventExpose gdkEvent = new GdkEventExpose ();
OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);