eclipse/eclipse-bug-903537.patch

16 lines
771 B
Diff
Raw Normal View History

--- eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
+++ eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Control.java
@@ -4232,7 +4232,11 @@ public boolean setParent (Composite parent) {
oldDecorations.fixAccelGroup ();
}
int /*long*/ newParent = parent.parentingHandle();
- OS.gtk_widget_reparent (topHandle, newParent);
+// OS.gtk_widget_reparent (topHandle, newParent);
+ OS.g_object_ref(topHandle);
+ OS.gtk_container_remove(OS.gtk_widget_get_parent(topHandle), topHandle);
+ OS.gtk_container_add(newParent, topHandle);
+ OS.g_object_unref(topHandle);
OS.gtk_fixed_move (newParent, topHandle, x, y);
/*
* Restore the original widget size since GTK does not keep it.