Skip to content

Commit f866ea7

Browse files
author
Xi Yan
committed
Bug 535075 - [Wayland] application rendered with an offset relatively to
host window Addressing AllNonBrowserTest crash and failures with previous patch. Change-Id: Ic868933a46ea1e06d625ae3b4c3c8e25e7ae5b2b Signed-off-by: Xi Yan <[email protected]>
1 parent 0dcb060 commit f866ea7

File tree

1 file changed

+4
-2
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets

1 file changed

+4
-2
lines changed

bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,10 @@ void forceResize (int width, int height) {
10181018
int [] dest_x = new int[1];
10191019
int [] dest_y = new int[1];
10201020
GTK.gtk_widget_translate_coordinates(vboxHandle, shellHandle, 0, 0, dest_x, dest_y);
1021-
allocation.x += dest_x[0];
1022-
allocation.y += dest_y[0];
1021+
if (dest_x[0] != -1 && dest_y[0] != -1) {
1022+
allocation.x += dest_x[0];
1023+
allocation.y += dest_y[0];
1024+
}
10231025
}
10241026

10251027
GTK.gtk_widget_size_allocate (vboxHandle, allocation);

0 commit comments

Comments
 (0)