Attachment "geometry.diff" to
ticket [2863003f]
added by
egavilan
2009-09-21 06:41:29.
--- generic/tkPack.c.orig 2009-09-20 14:40:30.000000000 -0300
+++ generic/tkPack.c 2009-09-20 15:10:34.000000000 -0300
@@ -585,11 +585,24 @@
/*
* If the master has no slaves anymore, then don't do anything at all:
- * just leave the master's size as-is.
+ * just leave the master's size as-is, but signal the master with the
+ * <<GeometryManager>> virtual event.
+ * Otherwise there is no way to "relinquish" control over the master
+ * so another geometry manager can take over.
*/
if (masterPtr->slavePtr == NULL) {
- return;
+ union {XEvent general; XVirtualEvent virtual;} event;
+ memset(&event, 0, sizeof(event));
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(masterPtr->tkwin));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(masterPtr->tkwin);
+ event.general.xany.display = Tk_Display(masterPtr->tkwin);
+ event.virtual.name = Tk_GetUid("GeometryManager");
+ Tk_HandleEvent(&event.general);
+
+ return;
}
/*
--- generic/tkGrid.c.orig 2009-09-20 14:40:16.000000000 -0300
+++ generic/tkGrid.c 2009-09-20 15:09:34.000000000 -0300
@@ -1703,13 +1703,24 @@
/*
* If the master has no slaves anymore, then don't do anything at all:
- * just leave the master's size as-is. Otherwise there is no way to
- * "relinquish" control over the master so another geometry manager can
- * take over.
+ * just leave the master's size as-is, but signal the master with the
+ * <<GeometryManager>> virtual event.
+ * Otherwise there is no way to "relinquish" control over the master
+ * so another geometry manager can take over.
*/
if (masterPtr->slavePtr == NULL) {
- return;
+ union {XEvent general; XVirtualEvent virtual;} event;
+ memset(&event, 0, sizeof(event));
+ event.general.xany.type = VirtualEvent;
+ event.general.xany.serial = NextRequest(Tk_Display(masterPtr->tkwin));
+ event.general.xany.send_event = False;
+ event.general.xany.window = Tk_WindowId(masterPtr->tkwin);
+ event.general.xany.display = Tk_Display(masterPtr->tkwin);
+ event.virtual.name = Tk_GetUid("GeometryManager");
+ Tk_HandleEvent(&event.general);
+
+ return;
}
if (masterPtr->masterDataPtr == NULL) {