Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Shell.java7
1 files changed, 5 insertions, 2 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 83dc2f8f8f..8a1178eee4 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
@@ -2138,7 +2138,7 @@ public void setAlpha (int alpha) {
}
void resizeBounds (int width, int height, boolean notify) {
- int border = 0;
+ int border = gtk_container_get_border_width_or_margin (shellHandle);
if (GTK.GTK4) {
if (redrawSurface != 0) {
GDK.gdk_surface_resize (redrawSurface, width, height);
@@ -2146,6 +2146,10 @@ void resizeBounds (int width, int height, boolean notify) {
if (redrawSurface != 0) {
GDK.gdk_surface_resize (redrawSurface, width, height);
}
+ GtkAllocation allocation = new GtkAllocation();
+ allocation.width = width;
+ allocation.height = height;
+ GTK.gtk_widget_size_allocate(shellHandle, allocation, -1);
} else {
if (redrawWindow != 0) {
GDK.gdk_window_resize (redrawWindow, width, height);
@@ -2153,7 +2157,6 @@ void resizeBounds (int width, int height, boolean notify) {
if (enableWindow != 0) {
GDK.gdk_window_resize (enableWindow, width, height);
}
- border = gtk_container_get_border_width_or_margin (shellHandle);
}
int boxWidth = width - 2*border;
int boxHeight = height - 2*border;

Back to the top