Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeo Ufimtsev2018-02-14 15:49:01 +0000
committerAlexander Kurtakov2018-02-15 16:20:39 +0000
commit1a3294ba5966b01cc2953d4ad12ed02eb971b97f (patch)
tree1129f5c27ad077c38883f1fbdd5920ff535fa840 /bundles/org.eclipse.swt/Eclipse SWT PI/gtk
parenta377e8395b4414fe37916d64d08d92f6cac6dfa2 (diff)
downloadeclipse.platform.swt-1a3294ba5966b01cc2953d4ad12ed02eb971b97f.tar.gz
eclipse.platform.swt-1a3294ba5966b01cc2953d4ad12ed02eb971b97f.tar.xz
eclipse.platform.swt-1a3294ba5966b01cc2953d4ad12ed02eb971b97f.zip
Bug 510803 [GTK3] Regression in table editing capabilities in tabfolder.I20180215-2000
Breakage occurred because tabItem reparented an item that had a non-standard gDk parent window. Solution: fix gdk window parent for such special controls. (I.e ControlEditors in tables). Verification: - Open child eclipse, change method signature. Now table cells can be edited via click. - Open attached snippet, with patch cells can be edited properly. - AllTests Gtk3.22 - X11/Wayland. Patchset 3: - Minor rename of methods to clarify that it's a *gdk* window, Bug: https://bugs.eclipse.org/bugs/show_bug.cgi?id=5108033 Change-Id: I8dcaac950eb0847dd97016b2140c607012550d2f Signed-off-by: Leo Ufimtsev <lufimtse@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT PI/gtk')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c8
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java4
2 files changed, 12 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
index bf5de70ab4..428d448027 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.c
@@ -13853,7 +13853,15 @@ JNIEXPORT void JNICALL GTK_NATIVE(_1gtk_1widget_1reparent)
(JNIEnv *env, jclass that, jintLong arg0, jintLong arg1)
{
GTK_NATIVE_ENTER(env, that, _1gtk_1widget_1reparent_FUNC);
+/*
gtk_widget_reparent((GtkWidget *)arg0, (GtkWidget *)arg1);
+*/
+ {
+ GTK_LOAD_FUNCTION(fp, gtk_widget_reparent)
+ if (fp) {
+ ((void (CALLING_CONVENTION*)(GtkWidget *, GtkWidget *))fp)((GtkWidget *)arg0, (GtkWidget *)arg1);
+ }
+ }
GTK_NATIVE_EXIT(env, that, _1gtk_1widget_1reparent_FUNC);
}
#endif
diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
index 8f61dd5494..5d9e0f323f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GTK.java
@@ -9003,11 +9003,14 @@ public class GTK extends OS {
}
}
/**
+ * @method flags=dynamic
* @param widget cast=(GtkWidget *)
* @param new_parent cast=(GtkWidget *)
*/
public static final native void _gtk_widget_reparent(long /*int*/ widget, long /*int*/ new_parent);
+ /** deprecated as of 3.14 */
public static final void gtk_widget_reparent(long /*int*/ widget, long /*int*/ new_parent) {
+ assert !GTK3; // On Gtk3, use Control.gtk_widget_reparent(..);
lock.lock();
try {
_gtk_widget_reparent(widget, new_parent);
@@ -9015,6 +9018,7 @@ public class GTK extends OS {
lock.unlock();
}
}
+
/**
* @param widget cast=(GtkWidget *)
* @param event cast=(GdkEvent *)

Back to the top