summaryrefslogtreecommitdiffstats
path: root/generic/tkFont.c
diff options
context:
space:
mode:
authorgriffin <briang42@easystreet.net>2021-08-04 21:40:11 (GMT)
committergriffin <briang42@easystreet.net>2021-08-04 21:40:11 (GMT)
commit5ebcc873d819a2a9ebdc6eb8416db300492e0961 (patch)
treed81c8ec6f364f9b58eb1195f0cdb1985ea290d4d /generic/tkFont.c
parent17bb340843c3e1f794cb5696e45ca1cb069f64fc (diff)
downloadtk-5ebcc873d819a2a9ebdc6eb8416db300492e0961.zip
tk-5ebcc873d819a2a9ebdc6eb8416db300492e0961.tar.gz
tk-5ebcc873d819a2a9ebdc6eb8416db300492e0961.tar.bz2
Possible fix for tkticket 3049518 - Generate <<TkWorldChanged>> event.
Diffstat (limited to 'generic/tkFont.c')
-rw-r--r--generic/tkFont.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/generic/tkFont.c b/generic/tkFont.c
index 9c157db..d3ef712 100644
--- a/generic/tkFont.c
+++ b/generic/tkFont.c
@@ -897,7 +897,8 @@ RecomputeWidgets(
{
Tk_ClassWorldChangedProc *proc =
Tk_GetClassProc(winPtr->classProcsPtr, worldChangedProc);
-
+ TkWindow *tkwinPtr;
+
if (proc != NULL) {
proc(winPtr->instanceData);
}
@@ -921,9 +922,16 @@ RecomputeWidgets(
* of the code below.
*/
- for (winPtr=winPtr->childList ; winPtr!=NULL ; winPtr=winPtr->nextPtr) {
- RecomputeWidgets(winPtr);
+ for (tkwinPtr=winPtr->childList ; tkwinPtr!=NULL ; tkwinPtr=tkwinPtr->nextPtr) {
+ RecomputeWidgets(tkwinPtr);
}
+
+ /*
+ * Broadcast font change virtually for mega-widget layout managers.
+ * Do this after the font change has been propagated to core widgets.
+ */
+ TkSendVirtualEvent((Tk_Window)winPtr, "TkWorldChanged",
+ Tcl_NewStringObj("FontChanged",-1));
}
/*