diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java index 4351547a44..0045057364 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Group.java @@ -109,17 +109,10 @@ public Point computeSize (int wHint, int hHint, boolean changed) { public Rectangle computeTrim (int x, int y, int width, int height) { checkWidget(); forceResize (); - int clientX = 0; - int clientY = 0; GtkAllocation allocation = new GtkAllocation(); - if (OS.GTK_VERSION >= OS.VERSION (2, 18, 0)) { - OS.gtk_widget_get_allocation(clientHandle, allocation); - clientX = allocation.x; - clientY = allocation.y; - } else { - clientX = OS.GTK_WIDGET_X (clientHandle); - clientY = OS.GTK_WIDGET_Y (clientHandle); - } + gtk_widget_get_allocation (clientHandle, allocation); + int clientX = allocation.x; + int clientY = allocation.y; x -= clientX; y -= clientY; width += clientX + clientX; |