Menu

#167 Tip #125 Implementation

TIP Implementation
open-fixed
8
2007-11-15
2004-07-26
No

Attached is a patch to implement Tip #125 [wm manage]
and [wm forget] commands. The patch includes Unix and
Windows implementations as well as a partial
implementation for MacOSX. For Aqua, only the button
and menubutton widgets may be placed in a [wm manage]'d
frame. To complete the implementation, the
TK_URBAN_RENEWAL flag must be recognized and handled by
all the intrinsic Tk widgets. See the patch for details.

You'll note that this patch implments an alternative
approach to the original [wm topleve] proposal. See
the updated Tip for details of this change.

Discussion

  • Brian Griffin

    Brian Griffin - 2004-07-26

    Patches on 8.5 HEAD for Tip #125

     
  • Brian Griffin

    Brian Griffin - 2004-07-27

    Logged In: YES
    user_id=22949

    I found a bug with the -menu option. tip125_2.patch has the
    bug fixed.

    -Brian

     
  • Brian Griffin

    Brian Griffin - 2004-07-27

    Patch on 8.5 HEAD for Tip #125 - bug fix

     
  • Donal K. Fellows

    • labels: --> 08. [(label)frame] and [toplevel]
    • assigned_to: nobody --> hobbs
     
  • Brian Griffin

    Brian Griffin - 2005-05-15

    Logged In: YES
    user_id=22949

    I've added code to deal with focus management. I've also removed the
    restriction on frames and toplevels. In theory, any widget can be managed
    as a toplevel. The class name is no longer changed, so a toplevel still has
    the class Toplevel when no longer managed by wm.

     
  • Brian Griffin

    Brian Griffin - 2005-05-15

    modified files based on HEAD as of 5/15/05

     
  • Brian Griffin

    Brian Griffin - 2006-11-08

    Logged In: YES
    user_id=22949

    This updated patch is for the current HEAD (as of 11/7/06
    approx 11:30pm pst)
    This patch also fixes problems with focus.

     
  • Brian Griffin

    Brian Griffin - 2006-11-08

    tip 125 patch based on HEAD as of 11/7/06

     
  • Joe English

    Joe English - 2006-11-10

    Logged In: YES
    user_id=68433

    In unix/tkUnixWm.c, function RemapWindows: it's not
    necessary to recursively call RemapWindows() for each child
    window; you just need to call XReparentWindow() on the
    outermost widget's Window. IOW, the recursive calls to
    RemapWindows(childPtr, winPtr) are either no-ops or (in the
    case of descendant toplevels) incorrect.

    Question: what is this for (also in RemapWindows())?

    if (strcmp(Tk_Class(winPtr), "Menu") == 0) {
    return;
    }

    It's probably not necessary to call XGetWindowAttributes()
    in this routine --
    Tk already knows the X and Y coordinates (which are the only
    fields of win_attr being used --
    win_attr.x and win_attr.y are normally the same as
    Tk_X(winPtr) and Tk_Y(winPtr),
    and besides they'll be overridden by the WM (in the case of
    [wm manage]) or GM
    (once remanaged after [wm forget]) anyway.

     
  • Brian Griffin

    Brian Griffin - 2006-11-27

    Logged In: YES
    user_id=22949
    Originator: YES

    I've run some tests on Unix with the changes Joe suggested. It seems to be fine. I don't recall why the code was written that way. The "Menu" test addresses the case of descendant toplevels as Menus have been the only descendant toplevel situation I've run into, probably by design.

    I still need to see if similar code on Windows is necessary, no-ops, or incorrect.

    -Brian

     
  • Donal K. Fellows

    • priority: 5 --> 9
     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-15

    Logged In: YES
    user_id=72656
    Originator: NO

    Updated TIP #125 implementation - needs OS X finishing.
    File Added: tip125.diff

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-15

    tip 125 from head of 2007-10-15

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-15

    Logged In: YES
    user_id=72656
    Originator: NO

    Dropped in the HEAD. Needs OS X implementation (code ifdef'd out).

     
  • Jeffrey Hobbs

    Jeffrey Hobbs - 2007-10-15
    • assigned_to: hobbs --> das
    • status: open --> open-fixed
     
  • Daniel A. Steffen

    • priority: 9 --> 8
     
  • Daniel A. Steffen

    Logged In: YES
    user_id=90580
    Originator: NO

    don't anticipate having time to do a full OSX implementation before 8.5.0, dropping prio

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.