summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-06-30 18:55:58 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-06-30 18:55:58 (GMT)
commit310e8e51335f9c6530bde45a82735fa8d1cb9d4e (patch)
tree74688baa35c90fb0c5d031fa11cad1e110a7833a
parentd128e0a7530de671cd860738c7f5a8c7c0daa30a (diff)
parentaa48fe2af2d30a45a8b32acf515cf943c8561f86 (diff)
downloadtk-310e8e51335f9c6530bde45a82735fa8d1cb9d4e.zip
tk-310e8e51335f9c6530bde45a82735fa8d1cb9d4e.tar.gz
tk-310e8e51335f9c6530bde45a82735fa8d1cb9d4e.tar.bz2
Fix [92e028b41b] and [c5eb909f86]: Theme changes to xpnative after switching user on Windows. Patch from Brad Lanam
-rw-r--r--win/ttkWinMonitor.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/win/ttkWinMonitor.c b/win/ttkWinMonitor.c
index c6e906b..6e46374 100644
--- a/win/ttkWinMonitor.c
+++ b/win/ttkWinMonitor.c
@@ -122,12 +122,15 @@ WndProc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
case WM_THEMECHANGED:
/*
- * Reset the application theme to 'xpnative' if present,
- * which will in turn fall back to 'winnative' if XP theming
- * is disabled.
+ * Reset the application theme.
+ * On windows, it is possible to sign in as a second user, change
+ * the theme to 'winnative' (by setting the ui to 'best performance'),
+ * which is a machine-wide change, and then sign back on to the original user.
+ * Ttk_UseTheme needs to be executed again in order to process the fallback
+ * from vista/xpnative to winnative.
*/
- theme = Ttk_GetTheme(interp, "xpnative");
+ theme = Ttk_GetCurrentTheme(interp);
if (theme) {
Ttk_UseTheme(interp, theme);
/* @@@ What to do about errors here? */