mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
Initialize Xrm only once.
This commit is contained in:
parent
c85f1cb0bf
commit
41bd981b38
5 changed files with 25 additions and 12 deletions
|
@ -3,6 +3,10 @@
|
|||
- Have separate config file.
|
||||
Bug fixes:
|
||||
- Fix subpixel rendering. (#303)
|
||||
- Fix basic tests on OpenBSD (#272)
|
||||
- Fix wong use of memcpy.
|
||||
- Work around for sigwaitinfo on OpenBSD.
|
||||
|
||||
0.15.12:
|
||||
New features:
|
||||
- Initial `-dump` command for dmenu mode. (#216)
|
||||
|
|
|
@ -38,6 +38,10 @@ void config_parse_cmd_options_dynamic ( void );
|
|||
void config_parse_xresource_options_dynamic ( Display *display );
|
||||
void config_parse_xresource_options_dynamic_file ( const char *filename );
|
||||
|
||||
/**
|
||||
* Initializes the Xresourced system.
|
||||
*/
|
||||
void config_parse_xresource_init ( void );
|
||||
/**
|
||||
* Free any allocated memory.
|
||||
*/
|
||||
|
|
|
@ -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" );
|
||||
|
|
|
@ -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 ();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue