From cbee61582435844b8e956da05e3f152dba4ded5a Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 15 Oct 2023 16:21:37 +0000 Subject: Fix [22eefb9368]: unixWm-45.2 and unixWm-45.4 fail on Linux. --- tests/unixWm.test | 4 ++-- unix/tkUnixWm.c | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/unixWm.test b/tests/unixWm.test index d296858..3980806 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -1627,7 +1627,7 @@ test unixWm-45.1 {UpdateSizeHints procedure, grid information} {unix testwrapper [expr [lindex $property 7]] [expr [lindex $property 8]] \ [expr [lindex $property 9]] [expr [lindex $property 10]] } {40 30 320 210 10 5} -test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper failsOnUbuntu failsOnXQuarz} { +test unixWm-45.2 {UpdateSizeHints procedure} {unix testwrapper} { destroy .t toplevel .t -width 80 -height 60 wm minsize .t 30 40 @@ -1655,7 +1655,7 @@ test unixWm-45.3 {UpdateSizeHints procedure, grid with menu} {testmenubar testwr [expr [lindex $property 7]] [expr [lindex $property 8]] \ [expr [lindex $property 9]] [expr [lindex $property 10]] } {60 40 53 320 233 10 5} -test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper failsOnUbuntu failsOnXQuarz} { +test unixWm-45.4 {UpdateSizeHints procedure, not resizable with menu} {testmenubar testwrapper} { destroy .t toplevel .t -width 80 -height 60 frame .t.menu -height 23 -width 50 diff --git a/unix/tkUnixWm.c b/unix/tkUnixWm.c index 9154c1d..df9cb76 100644 --- a/unix/tkUnixWm.c +++ b/unix/tkUnixWm.c @@ -1995,7 +1995,7 @@ WmGridCmd( * ungridded numbers. */ - wmPtr->sizeHintsFlags &= ~(PBaseSize|PResizeInc); + wmPtr->sizeHintsFlags &= ~PBaseSize; if (wmPtr->width != -1) { wmPtr->width = winPtr->reqWidth + (wmPtr->width - wmPtr->reqGridWidth)*wmPtr->widthInc; @@ -3819,8 +3819,7 @@ Tk_SetGrid( && (wmPtr->reqGridHeight == reqHeight) && (wmPtr->widthInc == widthInc) && (wmPtr->heightInc == heightInc) - && ((wmPtr->sizeHintsFlags & (PBaseSize|PResizeInc)) - == (PBaseSize|PResizeInc))) { + && ((wmPtr->sizeHintsFlags & PBaseSize) == PBaseSize)) { return; } @@ -3851,7 +3850,7 @@ Tk_SetGrid( wmPtr->reqGridHeight = reqHeight; wmPtr->widthInc = widthInc; wmPtr->heightInc = heightInc; - wmPtr->sizeHintsFlags |= PBaseSize|PResizeInc; + wmPtr->sizeHintsFlags |= PBaseSize; wmPtr->flags |= WM_UPDATE_SIZE_HINTS; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); @@ -3910,7 +3909,7 @@ Tk_UnsetGrid( } wmPtr->gridWin = NULL; - wmPtr->sizeHintsFlags &= ~(PBaseSize|PResizeInc); + wmPtr->sizeHintsFlags &= ~PBaseSize; if (wmPtr->width != -1) { wmPtr->width = winPtr->reqWidth + (wmPtr->width - wmPtr->reqGridWidth)*wmPtr->widthInc; @@ -4878,7 +4877,7 @@ UpdateSizeHints( hintsPtr->max_aspect.x = wmPtr->maxAspect.x; hintsPtr->max_aspect.y = wmPtr->maxAspect.y; hintsPtr->win_gravity = wmPtr->gravity; - hintsPtr->flags = wmPtr->sizeHintsFlags | PMinSize; + hintsPtr->flags = wmPtr->sizeHintsFlags | PMinSize | PResizeInc; /* * If the window isn't supposed to be resizable, then set the minimum and -- cgit v0.12