diff options
7 files changed, 0 insertions, 87 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 72435895eb..b3aa96a79d 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 @@ -2821,18 +2821,6 @@ JNIEXPORT jlong JNICALL GDK_NATIVE(_1gdk_1window_1end_1draw_1frame) } #endif -#ifndef NO__1gdk_1window_1ensure_1native -JNIEXPORT jboolean JNICALL GDK_NATIVE(_1gdk_1window_1ensure_1native) - (JNIEnv *env, jclass that, jlong arg0) -{ - jboolean rc = 0; - GDK_NATIVE_ENTER(env, that, _1gdk_1window_1ensure_1native_FUNC); - rc = (jboolean)gdk_window_ensure_native((GdkWindow *)arg0); - GDK_NATIVE_EXIT(env, that, _1gdk_1window_1ensure_1native_FUNC); - return rc; -} -#endif - #ifndef NO__1gdk_1window_1focus JNIEXPORT void JNICALL GDK_NATIVE(_1gdk_1window_1focus) (JNIEnv *env, jclass that, jlong arg0, jint arg1) diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h index 4518ddba0d..11abf15d99 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os.h @@ -314,7 +314,6 @@ #define NO__1gdk_1window_1begin_1draw_1frame #define NO__1gdk_1window_1create_1similar_1surface #define NO__1gdk_1window_1destroy -#define NO__1gdk_1window_1ensure_1native #define NO__1gdk_1window_1end_1draw_1frame #define NO__1gdk_1window_1focus #define NO__1gdk_1window_1get_1children diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c index ae368db4a6..55747011df 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.c @@ -217,7 +217,6 @@ char * GDK_nativeFunctionNames[] = { "_1gdk_1window_1create_1similar_1surface", "_1gdk_1window_1destroy", "_1gdk_1window_1end_1draw_1frame", - "_1gdk_1window_1ensure_1native", "_1gdk_1window_1focus", "_1gdk_1window_1get_1children", "_1gdk_1window_1get_1device_1position", diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h index 395c9da3ba..e484f05a7b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/library/os_stats.h @@ -227,7 +227,6 @@ typedef enum { _1gdk_1window_1create_1similar_1surface_FUNC, _1gdk_1window_1destroy_FUNC, _1gdk_1window_1end_1draw_1frame_FUNC, - _1gdk_1window_1ensure_1native_FUNC, _1gdk_1window_1focus_FUNC, _1gdk_1window_1get_1children_FUNC, _1gdk_1window_1get_1device_1position_FUNC, diff --git a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java index 6f82cb4632..16e7f629f0 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java +++ b/bundles/org.eclipse.swt/Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk/GDK.java @@ -553,18 +553,6 @@ public class GDK extends OS { /** * @param window cast=(GdkWindow *) */ - public static final native boolean _gdk_window_ensure_native(long window); - public static final boolean gdk_window_ensure_native(long window) { - lock.lock(); - try { - return _gdk_window_ensure_native(window); - } finally { - lock.unlock(); - } - } - /** - * @param window cast=(GdkWindow *) - */ public static final native int _gdk_window_get_state(long window); /** [GTK3 only, if-def'd in os.h] */ public static final int gdk_window_get_state(long window) { 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 a199f99af3..a404b04c21 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 @@ -89,8 +89,6 @@ public class Tree extends Composite { TreeItem currentItem; ImageList imageList, headerImageList; boolean firstCustomDraw; - /** True iff a draw event has never been processed by this Tree */ - boolean firstDraw = true; /** True iff computeSize has never been called on this Tree */ boolean firstCompute = true; boolean modelChanged; @@ -2414,17 +2412,6 @@ void drawInheritedBackground (long cairo) { long gtk_draw (long widget, long cairo) { boolean haveBoundsChanged = boundsChangedSinceLastDraw; boundsChangedSinceLastDraw = false; - /* - * Feature in GTK: a drawing model change in GTK3.20 means that headers are not drawn - * if the Tree has no items. In such cases, the fix is to ensure that the Tree's GdkWindow - * is a native one. Only X11 is affected by this issue, see bug 541427 for more info. - */ - if (firstDraw && OS.isX11() && getItemCount() == 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0) - && !hasChildren && headerVisible) { - long binWindow = GTK.gtk_tree_view_get_bin_window(handle); - GDK.gdk_window_ensure_native(binWindow); - } - firstDraw = false; if ((state & OBSCURED) != 0) return 0; /* * Bug 537960: JFace tree viewers miss a repaint when resized by a SashForm diff --git a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug541427_TreeNoHeader.java b/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug541427_TreeNoHeader.java deleted file mode 100644 index b5da42f115..0000000000 --- a/tests/org.eclipse.swt.tests.gtk/ManualTests/org/eclipse/swt/tests/gtk/snippets/Bug541427_TreeNoHeader.java +++ /dev/null @@ -1,47 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 Matthew Khouzam and others. All rights reserved. - * The contents of this file are made available under the terms - * of the GNU Lesser General Public License (LGPL) Version 2.1 that - * accompanies this distribution (lgpl-v21.txt). The LGPL is also - * available at http://www.gnu.org/licenses/lgpl.html. If the version - * of the LGPL at http://www.gnu.org is different to the version of - * the LGPL accompanying this distribution and there is any conflict - * between the two license versions, the terms of the LGPL accompanying - * this distribution shall govern. - * - * Contributors: - * Matthew Khouzam - initial API and implementation - *******************************************************************************/ -package org.eclipse.swt.tests.gtk.snippets; - -import org.eclipse.swt.SWT; -import org.eclipse.swt.graphics.Point; -import org.eclipse.swt.widgets.Display; -import org.eclipse.swt.widgets.Shell; -import org.eclipse.swt.widgets.Tree; -import org.eclipse.swt.widgets.TreeColumn; - -public class Bug541427_TreeNoHeader { - public static void main(String[] args) { - // useless setup - Display display = new Display(); - Shell shell = new Shell(display); - shell.setSize(new Point(300, 200)); - - final Tree tree = new Tree(shell, SWT.NO_SCROLL); - tree.setHeaderVisible(true); - tree.setBounds(0, 0, 300, tree.getHeaderHeight()); - TreeColumn col1 = new TreeColumn(tree, SWT.NONE); - col1.setText("Hi Mom!"); - col1.setWidth(200); - TreeColumn col2 = new TreeColumn(tree, SWT.NONE); - col2.setText("Hi Dad!"); - col2.setWidth(200); - shell.open(); - while (!shell.isDisposed()) { - if (!display.readAndDispatch()) - display.sleep(); - } - display.dispose(); - } -} |