Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSnjezana Peco2014-04-29 20:09:31 +0000
committerAlexander Kurtakov2014-05-09 11:21:45 +0000
commitcc78900f837ae57b63ebd7ad5fb7e94c20673c8f (patch)
treeb3b81eb5bb0d25aa16392de30ffb5614b3175cdf
parent090e8dfef891d537ee91a695bdd9547272135b17 (diff)
downloadeclipse.platform.swt-cc78900f837ae57b63ebd7ad5fb7e94c20673c8f.tar.gz
eclipse.platform.swt-cc78900f837ae57b63ebd7ad5fb7e94c20673c8f.tar.xz
eclipse.platform.swt-cc78900f837ae57b63ebd7ad5fb7e94c20673c8f.zip
Bug 427480 - [GTK3] [GTK3.10] Trees display issues when expanded elements require Scroll
Change-Id: I7c2275de954f4937281ed8252f12f7e643b6a5ba Signed-off-by: Snjezana Peco <snjeza.peco@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java29
1 files changed, 20 insertions, 9 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
index 98839355a4..41c6bf299f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -2657,14 +2657,16 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
// Besides, GTK 3.10 >= uses the same cairo for all the tree's children. SWT invalidates the cairo.
// The fix is to create a new cairo.
if (OS.GTK_VERSION >= OS.VERSION(3, 9, 0)) {
- if (window == 0) {
- window = OS.gtk_widget_get_window(handle);
- }
- if (window != 0) {
- GdkRectangle r = new GdkRectangle();
- OS.gdk_cairo_get_clip_rectangle(cr, r);
- drawBackground (control, window, 0, 0, rect.x, r.y, r.width, r.height);
- }
+ // A temporary fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=427480
+ // Force native painting
+// if (window == 0) {
+// window = OS.gtk_widget_get_window(handle);
+// }
+// if (window != 0) {
+// GdkRectangle r = new GdkRectangle();
+// OS.gdk_cairo_get_clip_rectangle(cr, r);
+// drawBackground (control, window, 0, 0, rect.x, r.y, r.width, r.height);
+// }
} else {
if (cr != 0) {
Cairo.cairo_save (cr);
@@ -2713,6 +2715,11 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
sendEvent (SWT.EraseItem, event);
drawForeground = null;
drawState = event.doit ? event.detail : 0;
+ // A temporary fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=427480
+ // Force native painting
+ if (OS.GTK_VERSION >= OS.VERSION(3, 9, 0)) {
+ drawState |= SWT.FOREGROUND;
+ }
drawFlags &= ~(OS.GTK_CELL_RENDERER_FOCUSED | OS.GTK_CELL_RENDERER_SELECTED);
if ((drawState & SWT.SELECTED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_SELECTED;
if ((drawState & SWT.FOCUSED) != 0) drawFlags |= OS.GTK_CELL_RENDERER_FOCUSED;
@@ -2840,7 +2847,11 @@ void rendererRender (long /*int*/ cell, long /*int*/ cr, long /*int*/ window, lo
event.width = contentWidth [0];
event.height = rect.height;
event.detail = drawState;
- sendEvent (SWT.PaintItem, event);
+ // Temporary fix for https://bugs.eclipse.org/bugs/show_bug.cgi?id=427480
+ // Force native paint
+ if (OS.GTK_VERSION < OS.VERSION(3, 9, 0)) {
+ sendEvent (SWT.PaintItem, event);
+ }
gc.dispose();
}
}

Back to the top