diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-01-04 07:59:30 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-01-04 07:59:30 +0100 |
commit | 41bd981b3804bc2f596973baad506c6f81906f5b (patch) | |
tree | e634574f99e5de8c6f3f3eb45a0a2502231e69c4 /source | |
parent | c85f1cb0bff11f52e821e54974e06a04f932106f (diff) |
Initialize Xrm only once.
Diffstat (limited to 'source')
-rw-r--r-- | source/rofi.c | 4 | ||||
-rw-r--r-- | source/xrmoptions.c | 9 |
2 files changed, 9 insertions, 4 deletions
diff --git a/source/rofi.c b/source/rofi.c index b830114a..0714b1cd 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -2473,6 +2473,10 @@ int main ( int argc, char *argv[] ) sncontext = sn_launchee_context_new_from_environment ( sndisplay, DefaultScreen ( display ) ); } TICK_N ( "Startup Notification" ); + + // Initialize Xresources subsystem. + config_parse_xresource_init (); + TICK_N ( "Initialize Xresources system" ); // Setup keybinding setup_abe (); TICK_N ( "Setup abe" ); diff --git a/source/xrmoptions.c b/source/xrmoptions.c index d81053a2..f09b61b9 100644 --- a/source/xrmoptions.c +++ b/source/xrmoptions.c @@ -221,7 +221,6 @@ void config_parse_xresource_options ( Display *display ) { char *xRMS; // Map Xresource entries to rofi config options. - XrmInitialize (); xRMS = XResourceManagerString ( display ); if ( xRMS == NULL ) { @@ -237,7 +236,6 @@ void config_parse_xresource_options_file ( const char *filename ) return; } // Map Xresource entries to rofi config options. - XrmInitialize (); XrmDatabase xDB = XrmGetFileDatabase ( filename ); if ( xDB == NULL ) { return; @@ -331,7 +329,6 @@ void config_parse_xresource_options_dynamic ( Display *display ) { char *xRMS; // Map Xresource entries to rofi config options. - XrmInitialize (); xRMS = XResourceManagerString ( display ); if ( xRMS == NULL ) { @@ -347,7 +344,6 @@ void config_parse_xresource_options_dynamic_file ( const char *filename ) return; } // Map Xresource entries to rofi config options. - XrmInitialize (); XrmDatabase xDB = XrmGetFileDatabase ( filename ); if ( xDB == NULL ) { return; @@ -568,3 +564,8 @@ void print_xresources_theme ( void ) } } } + +void config_parse_xresource_init ( void ) +{ + XrmInitialize (); +} |