1756c26
From 890b5826e457d87824a6c61a9fdda45bd407811a Mon Sep 17 00:00:00 2001
1756c26
From: Eric Williams
1756c26
Date: Mon, 9 Sep 2019 15:20:17 -0400
1756c26
Subject: Bug 550606: [GTK] Right-click > Rename from Project Explorer
1756c26
 non-functional when starting with only hidden projects
1756c26
1756c26
Adjust the conditions for gdk_window_ensure_native() to ensure it only
1756c26
gets applied to the right cases.
1756c26
1756c26
Change-Id: I3a57d8674d79bbdc123f11352ab7c7d6b0e807f5
1756c26
Signed-off-by: Eric Williams <ericwill@redhat.com>
1756c26
---
1756c26
 .../org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java  | 3 ++-
1756c26
 1 file changed, 2 insertions(+), 1 deletion(-)
1756c26
1756c26
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
1756c26
index 95776fc898..411b8e0540 100644
1756c26
--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java	
1756c26
+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java	
1756c26
@@ -2419,7 +2419,8 @@ long gtk_draw (long widget, long cairo) {
1756c26
 	 * if the Tree has no items. In such cases, the fix is to ensure that the Tree's GdkWindow
1756c26
 	 * is a native one. Only X11 is affected by this issue, see bug 541427 for more info.
1756c26
 	 */
1756c26
-	if (firstDraw && OS.isX11() && getItemCount() == 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)) {
1756c26
+	if (firstDraw && OS.isX11() && getItemCount() == 0 && GTK.GTK_VERSION >= OS.VERSION(3, 20, 0)
1756c26
+			&& !hasChildren && headerVisible) {
1756c26
 		long binWindow = GTK.gtk_tree_view_get_bin_window(handle);
1756c26
 		GDK.gdk_window_ensure_native(binWindow);
1756c26
 	}
1756c26
-- 
1756c26
cgit v1.2.1
1756c26