Tk Source Code

View Ticket
Login
Ticket UUID: 22eefb93680a28b82bff51c55732cdb9c69ed5c
Title: unixWm-45.2 and unixWm-45.4 fail on Linux
Type: Bug Version: core-8-6-branch
Submitter: fvogel Created on: 2023-10-15 16:08:19
Subsystem: 67. Unix Window Operations Assigned To: fvogel
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2023-10-16 20:48:55
Resolution: Fixed Closed By: fvogel
    Closed on: 2023-10-16 20:48:55
Description:
==== unixWm-45.2 UpdateSizeHints procedure FAILED
==== Contents of test case:

    destroy .t
    toplevel .t -width 80 -height 60
    wm minsize .t 30 40
    wm maxsize .t 200 500
    wm geometry .t +0+0
    tkwait visibility .t
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]
    list [expr [lindex $property 5]] [expr [lindex $property 6]]  [expr [lindex $property 7]] [expr [lindex $property 8]]  [expr [lindex $property 9]] [expr [lindex $property 10]]

---- Result was:
30 40 200 500 0 0
---- Result should have been (exact matching):
30 40 200 500 1 1
==== unixWm-45.2 FAILED


==== unixWm-45.4 UpdateSizeHints procedure, not resizable with menu FAILED
==== Contents of test case:

    destroy .t
    toplevel .t -width 80 -height 60
    frame .t.menu -height 23 -width 50
    testmenubar window .t .t.menu
    wm resizable .t 0 0
    wm geometry .t +0+0
    tkwait visibility .t
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]
    list [winfo height .t]  [expr [lindex $property 5]] [expr [lindex $property 6]]  [expr [lindex $property 7]] [expr [lindex $property 8]]  [expr [lindex $property 9]] [expr [lindex $property 10]]

---- Result was:
60 80 83 80 83 0 0
---- Result should have been (exact matching):
60 80 83 80 83 1 1
==== unixWm-45.4 FAILED
User Comments: fvogel added on 2023-10-16 20:48:55:
Merged in core-8-6-branch and trunk.

fvogel added on 2023-10-15 16:25:12:

Fix: [b4ae383b3f]. Always pass the PResizeInc mask to the WM.


fvogel added on 2023-10-15 16:19:42:

These tests check that the width_inc and height_inc information from the WM_NORMAL_HINTS property are correctly set in the WM by the function UpdateSizeHints().

unixWm-45.1 tests this when the window is managed as a gridded window and this case is working.

unixWm-45.2 and unixWm-45.4 check the same when the window is managed as a normal (not gridded) window. This does not work because in function UpdateSizeHints() the call:

    XSetWMNormalHints(winPtr->display, wmPtr->wrapperPtr->window, hintsPtr);
has hintsPtr->flags not containing PResizeInc. Values hintsPtr->width_inc and hintsPtr->height_inc are therefore not propagated to the window manager. Then the values requested from the WM are not the expected ones when calling:
    set property [testprop [testwrapper .t] WM_NORMAL_HINTS]