aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSnjezana Peco2014-04-13 13:43:55 (EDT)
committerArun Thondapu2014-04-27 10:23:19 (EDT)
commit95182ccd2908446c4a49064e442c7923c70e257f (patch)
treef4804d4a3728be55ceca6dbd116bc7f074ce362d
parent6a989c04df16fff2ca094ee53b359a3493fa1919 (diff)
downloadeclipse.platform.swt-95182ccd2908446c4a49064e442c7923c70e257f.zip
eclipse.platform.swt-95182ccd2908446c4a49064e442c7923c70e257f.tar.gz
eclipse.platform.swt-95182ccd2908446c4a49064e442c7923c70e257f.tar.bz2
Bug 421127 - [GTK3] All views empty with GTK 3.10refs/changes/59/24959/7
Change-Id: I638a4eae430b2e2268369cb32c507b2f94bb20a8 Signed-off-by: Snjezana Peco <snjeza.peco@gmail.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java24
1 files changed, 17 insertions, 7 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
index 0d6e011..e1092f8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Widget.java
@@ -2055,12 +2055,19 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ user_data) {
long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ user_data) {
switch ((int)/*64*/user_data) {
case EXPOSE_EVENT_INVERSE: {
- GdkEventExpose gdkEvent = new GdkEventExpose ();
- OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
- long /*int*/ paintWindow = paintWindow();
- long /*int*/ window = gdkEvent.window;
- if (window != paintWindow) return 0;
- return (state & OBSCURED) != 0 ? 1 : 0;
+ if (OS.GTK3) {
+ if (OS.GTK_VERSION >= OS.VERSION(3, 9, 0) && OS.GTK_IS_CONTAINER(handle)) {
+ return gtk_draw(handle, arg0);
+ }
+ } else {
+ GdkEventExpose gdkEvent = new GdkEventExpose ();
+ OS.memmove (gdkEvent, arg0, GdkEventExpose.sizeof);
+ long /*int*/ paintWindow = paintWindow();
+ long /*int*/ window = gdkEvent.window;
+ if (window != paintWindow) return 0;
+ return (state & OBSCURED) != 0 ? 1 : 0;
+ }
+ return 0;
}
case BUTTON_PRESS_EVENT_INVERSE:
case BUTTON_RELEASE_EVENT_INVERSE:
@@ -2077,10 +2084,13 @@ long /*int*/ windowProc (long /*int*/ handle, long /*int*/ arg0, long /*int*/ us
case EVENT_AFTER: return gtk_event_after (handle, arg0);
case EXPOSE_EVENT: {
if (OS.GTK3) {
- return gtk_draw (handle, arg0);
+ if (OS.GTK_VERSION < OS.VERSION(3, 9, 0) || !OS.GTK_IS_CONTAINER(handle)) {
+ return gtk_draw(handle, arg0);
+ }
} else {
return gtk_expose_event (handle, arg0);
}
+ return 0;
}
case FOCUS: return gtk_focus (handle, arg0);
case FOCUS_IN_EVENT: return gtk_focus_in_event (handle, arg0);