Tk Source Code

View Ticket
Login
Ticket UUID: 915350
Title: Tk sets min, max size in WM_HINTS when it shouldn't
Type: Bug Version: obsolete: 8.4.6
Submitter: jenglish Created on: 2004-03-12 23:16:46
Subsystem: 67. Unix Window Operations Assigned To: hobbs
Priority: 8 Severity:
Status: Closed Last Modified: 2004-04-21 09:53:01
Resolution: Fixed Closed By: jenglish
    Closed on: 2004-04-21 02:53:01
Description:
(See also: http://bugs.kde.org/show_bug.cgi?id=67577)

Problem: Tk toplevels always set the min_width,
min_height, max_width, and max_height fields in the
WM_NORMAL_HINTS property, even when the user has not
called [wm minsize] or [wm maxsize].   

The default minimum size is 1x1 (which is redundant),
and the default maximum is taken from the size of the
screen (which is not even correct in the context of
multi-head displays). 

This causes recent versions of KWM (and possibly other
WMs) to disable maximization.  In any event, Tk
shouldn't specify these fields unless explicitly
instructed to.
User Comments: jenglish added on 2004-04-21 09:53:01:
Logged In: YES 
user_id=68433

> Please backport to core-8-4-branch.

Done.

hobbs added on 2004-04-15 05:14:21:
Logged In: YES 
user_id=72656

Please backport to core-8-4-branch.

jenglish added on 2004-04-05 03:24:53:
Logged In: YES 
user_id=68433

Patch comitted; closing.  

(Jeff -- if you'd like me to back-port this to the 8.4
branch, let me know.)

jenglish added on 2004-03-25 22:50:02:
Logged In: YES 
user_id=68433

Jean-Luc Fontain reports (via email):

> Just tried it [the patch] with moodss on Red Hat Fedora
Core 1 
> with kde 3.2.1 and it works just fine with both Tk 8.4.6
and 8.5a1.

jenglish added on 2004-03-25 06:00:15:

File Added - 81258: tk-wm-maxsize.patch

jenglish added on 2004-03-25 06:00:13:
Logged In: YES 
user_id=68433

With the attached patch, Tk will only set the PMaxSize hints
flag if the program has called [wm maxsize $win $x $y], with
$x or $y > 0.  [wm maxsize $win 0 0] (or any values <= 0)
will clear the PMaxSIze bit.  If one or the other of $x and
$y are <= 0, but not both, it will use the screen width
(resp. height) as the maximum size for that dimension.

This is a conservative patch; no other behaviour should be
affected, iincluding min-size hints.  (However, there are
probably some some now-dead code paths that should be
cleaned up).

nobody added on 2004-03-13 19:13:43:
Logged In: NO 

Would you please announce in comp.lang.tcl when a patch
becomes available? I would like to include it in my
binarires (rpms, ...).
Many thanks in advance.  Jean-Luc ([email protected])

Attachments: