From d79dbc8332c9640340ee67745b0de2e093c6d536 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 15 Oct 2023 16:30:25 +0000 Subject: unixWm.test - Let unixWm-45.2 and -45.4 pass on Linux by cherrypicking [b4ae383b] and [391bac1d] that fix bug [22eefb9368]. --- macosx/tkMacOSXWm.c | 9 ++++----- tests/unixWm.test | 4 ++-- unix/tkUnixWm.c | 11 +++++------ win/tkWinWm.c | 9 ++++----- 4 files changed, 15 insertions(+), 18 deletions(-) diff --git a/macosx/tkMacOSXWm.c b/macosx/tkMacOSXWm.c index 0adfe4b..858ac34 100644 --- a/macosx/tkMacOSXWm.c +++ b/macosx/tkMacOSXWm.c @@ -2205,7 +2205,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; @@ -3984,8 +3984,7 @@ Tk_SetGrid( && (wmPtr->reqGridHeight == reqHeight) && (wmPtr->widthInc == widthInc) && (wmPtr->heightInc == heightInc) - && ((wmPtr->sizeHintsFlags & (PBaseSize|PResizeInc)) - == (PBaseSize|PResizeInc))) { + && ((wmPtr->sizeHintsFlags & PBaseSize) == PBaseSize)) { return; } @@ -4015,7 +4014,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); @@ -4063,7 +4062,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; diff --git a/tests/unixWm.test b/tests/unixWm.test index e9cae75..960d039 100644 --- a/tests/unixWm.test +++ b/tests/unixWm.test @@ -1623,7 +1623,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 @@ -1651,7 +1651,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 diff --git a/win/tkWinWm.c b/win/tkWinWm.c index 34ae154..98c699e 100644 --- a/win/tkWinWm.c +++ b/win/tkWinWm.c @@ -3847,7 +3847,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; @@ -5793,8 +5793,7 @@ Tk_SetGrid( && (wmPtr->reqGridHeight == reqHeight) && (wmPtr->widthInc == widthInc) && (wmPtr->heightInc == heightInc) - && ((wmPtr->sizeHintsFlags & (PBaseSize|PResizeInc)) - == (PBaseSize|PResizeInc))) { + && ((wmPtr->sizeHintsFlags & PBaseSize) == PBaseSize)) { return; } @@ -5825,7 +5824,7 @@ Tk_SetGrid( wmPtr->reqGridHeight = reqHeight; wmPtr->widthInc = widthInc; wmPtr->heightInc = heightInc; - wmPtr->sizeHintsFlags |= PBaseSize|PResizeInc; + wmPtr->sizeHintsFlags |= PBaseSize; if (!(wmPtr->flags & (WM_UPDATE_PENDING|WM_NEVER_MAPPED))) { Tcl_DoWhenIdle(UpdateGeometryInfo, winPtr); wmPtr->flags |= WM_UPDATE_PENDING; @@ -5876,7 +5875,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; -- cgit v0.12