static GModule * this_module = NULL;\r
static void (*msw_reset_rc_styles) (GtkSettings * settings) = NULL;\r
\r
-/* TODO - look into whether we need to handle these:\r
- *\r
- * WM_STYLECHANGED\r
- * WM_PALETTECHANGED\r
- */\r
static GdkFilterReturn\r
global_filter_func (void *xevent,\r
GdkEvent *event,\r
\r
switch (msg->message)\r
{\r
- /* We need to do something better than this check - if a theme builder has GTK 2.4.x\r
- but the user has 2.2.x, he/she will run into trouble wrt unresolved symbols */\r
-\r
/* catch theme changes */\r
case WM_THEMECHANGED:\r
case WM_SYSCOLORCHANGE:\r
-\r
- if(msw_reset_rc_styles != NULL) {\r
- xp_theme_reset ();\r
- msw_style_init ();\r
-\r
- /* force all gtkwidgets to redraw */\r
- (*msw_reset_rc_styles) (gtk_settings_get_default());\r
- }\r
-\r
+ \r
+ if(msw_reset_rc_styles != NULL) {\r
+ xp_theme_reset ();\r
+ msw_style_init ();\r
+ \r
+ /* force all gtkwidgets to redraw */\r
+ (*msw_reset_rc_styles) (gtk_settings_get_default());\r
+ }\r
+ \r
return GDK_FILTER_REMOVE;\r
\r
case WM_SETTINGCHANGE:\r
msw_style_register_type (module);\r
\r
/* this craziness is required because only gtk 2.4.x and later have\r
- gtk_rc_reset_styles(). But we want to be able to run acceptly well\r
- on any GTK 2.x.x platform. */\r
+ gtk_rc_reset_styles(). But we want to be able to run acceptly well\r
+ on any GTK 2.x.x platform. */\r
if(gtk_check_version(2,4,0) == NULL) {\r
- /* dlopen(this) */\r
- this_module = g_module_open(NULL, 0);\r
-\r
- if(this_module)\r
- g_module_symbol (this_module, "gtk_rc_reset_styles",\r
- (gpointer *)(&msw_reset_rc_styles));\r
+ this_module = g_module_open(NULL, 0);\r
+ \r
+ if(this_module)\r
+ g_module_symbol (this_module, "gtk_rc_reset_styles",\r
+ (gpointer *)(&msw_reset_rc_styles));\r
}\r
-\r
+ \r
msw_style_init ();\r
gdk_window_add_filter (NULL, global_filter_func, NULL);\r
}\r
gdk_window_remove_filter (NULL, global_filter_func, NULL);\r
\r
if(this_module) {\r
- g_module_close(this_module);\r
- this_module = NULL;\r
+ g_module_close(this_module);\r
+ this_module = NULL;\r
}\r
}\r
\r