From 890b5826e457d87824a6c61a9fdda45bd407811a Mon Sep 17 00:00:00 2001
From: Eric Williams
Date: Mon, 9 Sep 2019 15:20:17 -0400
Subject: Bug 550606: [GTK] Right-click > Rename from Project Explorer
non-functional when starting with only hidden projects
Adjust the conditions for gdk_window_ensure_native() to ensure it only
gets applied to the right cases.
Change-Id: I3a57d8674d79bbdc123f11352ab7c7d6b0e807f5
Signed-off-by: Eric Williams <ericwill@redhat.com>
---
.../org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 95776fc898..411b8e0540 100644
--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
+++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java
@@ -2419,7 +2419,8 @@ long gtk_draw (long widget, long cairo) {
* 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)) {
+ 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);
}
--
cgit v1.2.1