diff options
author | fvogel <fvogelnew1@free.fr> | 2015-06-01 18:50:06 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2015-06-01 18:50:06 (GMT) |
commit | 47ff1264914b87d922a13ea6b1a49f99adba53f2 (patch) | |
tree | b1868b4314c63043cda16b0619e278df243f0f49 | |
parent | a7f2f0c0b198b3753dc20f089bfb40c8f26d044d (diff) | |
parent | 06cad2c9acc51cefa77a0935d52fde5b3d79691e (diff) | |
download | tk-47ff1264914b87d922a13ea6b1a49f99adba53f2.zip tk-47ff1264914b87d922a13ea6b1a49f99adba53f2.tar.gz tk-47ff1264914b87d922a13ea6b1a49f99adba53f2.tar.bz2 |
Fixed bug [1292219fff] - Propagated MapNotify and UnmapNotify events of a panedwindow to its children
-rw-r--r-- | generic/tkPanedWindow.c | 9 | ||||
-rw-r--r-- | tests/panedwindow.test | 17 |
2 files changed, 26 insertions, 0 deletions
diff --git a/generic/tkPanedWindow.c b/generic/tkPanedWindow.c index 0e1bc53..d2da227 100644 --- a/generic/tkPanedWindow.c +++ b/generic/tkPanedWindow.c @@ -1335,6 +1335,7 @@ PanedWindowEventProc( XEvent *eventPtr) /* Information about event. */ { PanedWindow *pwPtr = (PanedWindow *) clientData; + int i; if (eventPtr->type == Expose) { if (pwPtr->tkwin != NULL && !(pwPtr->flags & REDRAW_PENDING)) { @@ -1349,6 +1350,14 @@ PanedWindowEventProc( } } else if (eventPtr->type == DestroyNotify) { DestroyPanedWindow(pwPtr); + } else if (eventPtr->type == UnmapNotify) { + for (i = 0; i < pwPtr->numSlaves; i++) { + Tk_UnmapWindow(pwPtr->slaves[i]->tkwin); + } + } else if (eventPtr->type == MapNotify) { + for (i = 0; i < pwPtr->numSlaves; i++) { + Tk_MapWindow(pwPtr->slaves[i]->tkwin); + } } } diff --git a/tests/panedwindow.test b/tests/panedwindow.test index c7d84b8..724b40d 100644 --- a/tests/panedwindow.test +++ b/tests/panedwindow.test @@ -2460,6 +2460,23 @@ test panedwindow-26.1 {DestroyPanedWindow} { } set result {} } {} +test panedwindow-26.2 {UnmapNotify and MapNotify events are propagated to slaves} { + panedwindow .pw + .pw add [button .pw.b] + pack .pw + update + set result [winfo ismapped .pw.b] + pack forget .pw + update + lappend result [winfo ismapped .pw.b] + lappend result [winfo ismapped .pw] + pack .pw + update + lappend result [winfo ismapped .pw] + lappend result [winfo ismapped .pw.b] + destroy .pw .pw.b + set result +} {1 0 0 1 1} test panedwindow-27.1 {PanedWindowIdentifyCoords} { panedwindow .p -bd 0 -sashwidth 2 -sashpad 2 |