Tk Source Code

View Ticket
Login
Ticket UUID: 220357
Title: On Windows, don't use a maximize box if the Windows is not resizable
Type: Bug Version: obsolete: 8.0p2
Submitter: welch Created on: 2000-10-31 23:17:14
Subsystem: 68. Win Window Operations Assigned To: nobody
Priority: 2 Severity:
Status: Closed Last Modified: 2001-03-23 02:22:23
Resolution: Fixed Closed By: dgp
    Closed on: 2001-03-22 19:22:23
Description:
OriginalBugID: 595 Bug
Version: 8.0p2
SubmitDate: '1998-05-21'
LastModified: '1999-03-17'
Severity: LOW
Status: Released
Submitter: hershey
ChangedBy: stanton
OS: All
OSVersion: NA
Machine: NA
FixedDate: '1999-03-17'
FixedInVersion: 8.1b2


On Windows, if a window is not resizable (because of a call to wm

resizable), there is really no reason to have a maximize box or a

sizing frame.  In fact, it's better to omit them, because they suggest

to Windows users that the window can be resized, even though it can't.



The appended patch makes this change in Tk8.0p2.  It should also apply

to Tk8.1a2.



Ian Taylor

[email protected]



*** /5g/ian/tk8.0p2/win/tkWinWm.c       Fri Oct 31 12:57:07 1997

--- tkWinWm.c   Wed Apr 15 15:52:20 1998

*************** UpdateWrapper(winPtr)

*** 668,673 ****

--- 668,678 ----

            wmPtr->exStyle = EX_TOPLEVEL_STYLE;

        }

  

+       if ((wmPtr->flags & WM_WIDTH_NOT_RESIZABLE)

+           && (wmPtr->flags & WM_HEIGHT_NOT_RESIZABLE)) {

+           wmPtr->style &= ~ (WS_MAXIMIZEBOX | WS_SIZEBOX);

+       }

+ 

        /*

         * Compute the geometry of the parent and child windows.

         */





03/17/1999 15:05 - stanton - applied patch