summaryrefslogtreecommitdiffstats
path: root/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Table.java11
1 files changed, 4 insertions, 7 deletions
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 f5e118982d..501a8ea17c 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
@@ -1136,13 +1136,10 @@ public Rectangle getClientArea () {
int [] fixedX = new int [1], fixedY = new int [1];
OS.gdk_window_get_origin (fixedWindow, fixedX, fixedY);
int /*long*/ clientHandle = clientHandle ();
- int width = 0, height = 0;
- if ((state & ZERO_WIDTH) == 0) {
- GtkAllocation allocation = new GtkAllocation ();
- gtk_widget_get_allocation (clientHandle, allocation);
- width = allocation.width;
- height = allocation.height;
- }
+ GtkAllocation allocation = new GtkAllocation ();
+ gtk_widget_get_allocation (clientHandle, allocation);
+ int width = (state & ZERO_WIDTH) != 0 ? 0 : allocation.width;
+ int height = (state & ZERO_HEIGHT) != 0 ? 0 : allocation.height;
return new Rectangle (fixedX [0] - binX [0], fixedY [0] - binY [0], width, height);
}