Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
index 94596626b9..894a473886 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java
@@ -2730,7 +2730,11 @@ public void forceActive () {
Rectangle getBoundsInPixels () {
checkWidget ();
int [] x = new int [1], y = new int [1];
- OS.gtk_window_get_position (shellHandle, x, y);
+ if ((state & Widget.DISPOSE_SENT) == 0) {
+ OS.gtk_window_get_position (shellHandle, x, y);
+ } else {
+ OS.gdk_window_get_root_origin(OS.gtk_widget_get_window(shellHandle), x, y);
+ }
GtkAllocation allocation = new GtkAllocation ();
OS.gtk_widget_get_allocation (vboxHandle, allocation);
int width = allocation.width;

Back to the top