1
0
Fork 0
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:
Dave Davenport 2016-01-04 07:59:30 +01:00
parent c85f1cb0bf
commit 41bd981b38
5 changed files with 25 additions and 12 deletions

View file

@ -3,6 +3,10 @@
- Have separate config file. - Have separate config file.
Bug fixes: Bug fixes:
- Fix subpixel rendering. (#303) - Fix subpixel rendering. (#303)
- Fix basic tests on OpenBSD (#272)
- Fix wong use of memcpy.
- Work around for sigwaitinfo on OpenBSD.
0.15.12: 0.15.12:
New features: New features:
- Initial `-dump` command for dmenu mode. (#216) - Initial `-dump` command for dmenu mode. (#216)

View file

@ -32,14 +32,14 @@ typedef struct
typedef enum typedef enum
{ {
TB_AUTOHEIGHT = 1 << 0, TB_AUTOHEIGHT = 1 << 0,
TB_AUTOWIDTH = 1 << 1, TB_AUTOWIDTH = 1 << 1,
TB_LEFT = 1 << 16, TB_LEFT = 1 << 16,
TB_RIGHT = 1 << 17, TB_RIGHT = 1 << 17,
TB_CENTER = 1 << 18, TB_CENTER = 1 << 18,
TB_EDITABLE = 1 << 19, TB_EDITABLE = 1 << 19,
TB_MARKUP = 1 << 20, TB_MARKUP = 1 << 20,
TB_WRAP = 1 << 21, TB_WRAP = 1 << 21,
} TextboxFlags; } TextboxFlags;
typedef enum typedef enum

View file

@ -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 ( Display *display );
void config_parse_xresource_options_dynamic_file ( const char *filename ); void config_parse_xresource_options_dynamic_file ( const char *filename );
/**
* Initializes the Xresourced system.
*/
void config_parse_xresource_init ( void );
/** /**
* Free any allocated memory. * Free any allocated memory.
*/ */

View file

@ -2473,6 +2473,10 @@ int main ( int argc, char *argv[] )
sncontext = sn_launchee_context_new_from_environment ( sndisplay, DefaultScreen ( display ) ); sncontext = sn_launchee_context_new_from_environment ( sndisplay, DefaultScreen ( display ) );
} }
TICK_N ( "Startup Notification" ); TICK_N ( "Startup Notification" );
// Initialize Xresources subsystem.
config_parse_xresource_init ();
TICK_N ( "Initialize Xresources system" );
// Setup keybinding // Setup keybinding
setup_abe (); setup_abe ();
TICK_N ( "Setup abe" ); TICK_N ( "Setup abe" );

View file

@ -221,7 +221,6 @@ void config_parse_xresource_options ( Display *display )
{ {
char *xRMS; char *xRMS;
// Map Xresource entries to rofi config options. // Map Xresource entries to rofi config options.
XrmInitialize ();
xRMS = XResourceManagerString ( display ); xRMS = XResourceManagerString ( display );
if ( xRMS == NULL ) { if ( xRMS == NULL ) {
@ -237,7 +236,6 @@ void config_parse_xresource_options_file ( const char *filename )
return; return;
} }
// Map Xresource entries to rofi config options. // Map Xresource entries to rofi config options.
XrmInitialize ();
XrmDatabase xDB = XrmGetFileDatabase ( filename ); XrmDatabase xDB = XrmGetFileDatabase ( filename );
if ( xDB == NULL ) { if ( xDB == NULL ) {
return; return;
@ -331,7 +329,6 @@ void config_parse_xresource_options_dynamic ( Display *display )
{ {
char *xRMS; char *xRMS;
// Map Xresource entries to rofi config options. // Map Xresource entries to rofi config options.
XrmInitialize ();
xRMS = XResourceManagerString ( display ); xRMS = XResourceManagerString ( display );
if ( xRMS == NULL ) { if ( xRMS == NULL ) {
@ -347,7 +344,6 @@ void config_parse_xresource_options_dynamic_file ( const char *filename )
return; return;
} }
// Map Xresource entries to rofi config options. // Map Xresource entries to rofi config options.
XrmInitialize ();
XrmDatabase xDB = XrmGetFileDatabase ( filename ); XrmDatabase xDB = XrmGetFileDatabase ( filename );
if ( xDB == NULL ) { if ( xDB == NULL ) {
return; return;
@ -568,3 +564,8 @@ void print_xresources_theme ( void )
} }
} }
} }
void config_parse_xresource_init ( void )
{
XrmInitialize ();
}