Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java12
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java11
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Tree.java11
3 files changed, 14 insertions, 20 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
index 36c42bcdd0..33c10508c8 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Composite.java
@@ -90,13 +90,13 @@ public class Composite extends Scrollable {
static final String NO_INPUT_METHOD = "org.eclipse.swt.internal.gtk.noInputMethod"; //$NON-NLS-1$
Shell popupChild;
/**
- * A Rectangle which, if specified, denotes an area where child widgets
- * should not be drawn. Only relevant if such child widgets are being
+ * If set to {@code true}, child widgets with negative y coordinate GTK allocation
+ * will not be drawn. Only relevant if such child widgets are being
* drawn via propagateDraw(), such as Tree/Table editing widgets.
*
- * See bug 535978.
+ * See bug 535978 and bug 547986.
*/
- Rectangle noChildDrawing = null;
+ boolean noChildDrawing = false;
/**
* A HashMap of child widgets that keeps track of which child has had their
* GdkWindow lowered/raised. Only relevant if such child widgets are being
@@ -1433,7 +1433,7 @@ void propagateDraw (long container, long cairo) {
if (child != 0) {
Widget widget = display.getWidget (child);
if (widget != this) {
- if (noChildDrawing != null) {
+ if (noChildDrawing) {
Boolean childLowered = childrenLowered.get(widget);
if (childLowered == null) {
childrenLowered.put(widget, false);
@@ -1441,7 +1441,7 @@ void propagateDraw (long container, long cairo) {
}
GtkAllocation allocation = new GtkAllocation ();
GTK.gtk_widget_get_allocation(child, allocation);
- if ((allocation.y + allocation.height) < noChildDrawing.height) {
+ if (allocation.y < 0) {
if (!childLowered) {
if (GTK.GTK4) {
long surface = gtk_widget_get_surface(child);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
index 4a539aba02..2cb84f7a88 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
@@ -2535,7 +2535,7 @@ void propagateDraw (long container, long cairo) {
* "noChildDrawing" widgets might still be partially drawn.
*/
super.propagateDraw(container, cairo);
- if (headerVisible && noChildDrawing != null && wasScrolled) {
+ if (headerVisible && noChildDrawing && wasScrolled) {
for (TableColumn column : columns) {
if (column != null) {
GTK.gtk_widget_queue_draw(column.buttonHandle);
@@ -4175,15 +4175,12 @@ long windowProc (long handle, long arg0, long user_data) {
*/
if (hasChildren) {
/*
- * If headers are visible, set noChildDrawing to their
- * dimensions -- this will prevent any child widgets from drawing
+ * If headers are visible, set noChildDrawing to true
+ * this will prevent any child widgets from drawing
* over the header buttons. See bug 535978.
*/
if (headerVisible) {
- GdkRectangle rect = new GdkRectangle ();
- GDK.gdk_cairo_get_clip_rectangle (arg0, rect);
- // -1's is for the 1px of padding between the fixedHandle and handle
- noChildDrawing = new Rectangle(0, 0, rect.width - 1, this.headerHeight - 1);
+ noChildDrawing = true;
}
propagateDraw(handle, arg0);
}
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 af67fbb6c6..0ef25d72fa 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
@@ -2723,7 +2723,7 @@ void propagateDraw (long container, long cairo) {
* "noChildDrawing" widgets might still be partially drawn.
*/
super.propagateDraw(container, cairo);
- if (headerVisible && noChildDrawing != null && wasScrolled) {
+ if (headerVisible && noChildDrawing && wasScrolled) {
for (TreeColumn column : columns) {
if (column != null) {
GTK.gtk_widget_queue_draw(column.buttonHandle);
@@ -4149,15 +4149,12 @@ long windowProc (long handle, long arg0, long user_data) {
*/
if (hasChildren) {
/*
- * If headers are visible, set noChildDrawing to their
- * dimensions -- this will prevent any child widgets from drawing
+ * If headers are visible, set noChildDrawing to true
+ * this will prevent any child widgets from drawing
* over the header buttons. See bug 535978.
*/
if (headerVisible) {
- GdkRectangle rect = new GdkRectangle ();
- GDK.gdk_cairo_get_clip_rectangle (arg0, rect);
- // -1's is for the 1px of padding between the fixedHandle and handle
- noChildDrawing = new Rectangle(0, 0, rect.width - 1, this.headerHeight - 1);
+ noChildDrawing = true;
}
propagateDraw(handle, arg0);
}

Back to the top