Ticket UUID: | 1292219 | |||
Title: | panedwindow don't propagate Map/Unmap state to children | |||
Type: | Bug | Version: | None | |
Submitter: | beric | Created on: | 2005-09-15 18:42:49 | |
Subsystem: | 21. [panedwindow] | Assigned To: | fvogel | |
Priority: | 7 High | Severity: | Minor | |
Status: | Closed | Last Modified: | 2015-06-01 18:52:40 | |
Resolution: | Fixed | Closed By: | fvogel | |
Closed on: | 2015-06-01 18:52:40 | |||
Description: |
Unlike the other geometry manager (e.g. pack, see tkPack.c, 1400), panedwindow do not handle MapNotify and UnmapNotify events to propagate to its children. So, we can have: panedwindow .pw .pw add [button .pw.b] pack .pw update puts [winfo ismapped .pw.b] ;# => 1 pack forget .pw update puts [winfo ismapped .pw.b] ;# => 1 puts [winfo ismapped .pw] ;# => 0 This is the same for ttk::notebook. | |||
User Comments: |
fvogel added on 2015-06-01 18:52:40:
Merged in core-8-5-branch and trunk. fvogel added on 2015-05-30 14:07:24: OK, understood. Once UnMapNotify event is propagated to the panes, they are seen as unmapped by Tk. Then, when remapping them through "pack .pw", the MapNotify event shall be propagated, otherwise [winfo ismapped ] is again wrong after re-packing. Fix committed, with completed test, in branch bug-1292219fff fvogel added on 2015-05-30 09:42:35: Fix proposed in branch bug-1292219 for propagation of UnMap event only. This fixes the given test case since now: % panedwindow .pw .pw % .pw add [button .pw.b] % pack .pw % update % winfo ismapped .pw.b ;# => 1 (correct) 1 % pack forget .pw % update % winfo ismapped .pw.b ;# => 1 before the fix, but is correctly 0 with it 0 % winfo ismapped .pw ;# => 0 (correct) 0 Now I'm not sure if something more needs to be done. Specifically, I couldn't find a case where MapNotify event was not propagated, despite this was reported. Anyone able to provide further examples of the issue reported in the present ticket? beric added on 2007-09-28 02:08:46: Logged In: YES user_id=493507 Originator: YES Just want to raise an alarm for this old bug. jenglish added on 2006-03-24 01:53:00: Logged In: YES user_id=68433 For Tile: ttk::notebook, ttk::paned, and ttk::labelframe widgets now propagate Map / Unmap events to their children. jenglish added on 2005-10-16 05:53:27: Logged In: YES user_id=68433 Same for the ttk::paned widget. This is normally not a problem on X11, since only "viewable" windows are displayed (a window is viewable if it and all of its ancestors are mapped). However, on OSX this does cause some display glitches, since the Xlib emulation layer in TkAqua doesn't honor the mapped/unmapped/viewable/unviewable state, and most widgets only look at Tk_IsMapped in their redraw handlers. |