diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-06-01 11:50:44 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-06-01 11:57:17 +0200 |
commit | f042851add70c9af0adc2b3017dedbb563c9ca3a (patch) | |
tree | 10cf6a2d2fd9323602714afd81a6588465f4ac51 /source/rofi.c | |
parent | 93cf26414e379c721d0ce5a938ea3ca111dadbba (diff) |
xcb: Hide some internal details
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/rofi.c')
-rw-r--r-- | source/rofi.c | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/source/rofi.c b/source/rofi.c index bab587bb..b22e3e25 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -138,21 +138,6 @@ static int switcher_get ( const char *name ) } /** - * Do needed steps to start showing the gui - */ -static int setup () -{ - // Create pid file - int pfd = create_pid_file ( pidfile ); - if ( pfd >= 0 ) { - // Request truecolor visual. - x11_create_visual_and_colormap ( ); - textbox_setup (); - } - return pfd; -} - -/** * Teardown the gui. */ static void teardown ( int pfd ) @@ -956,17 +941,22 @@ int main ( int argc, char *argv[] ) rofi_view_workers_initialize (); + // Create pid file + int pfd = create_pid_file ( pidfile ); + if ( pfd < 0 ) { + cleanup (); + return EXIT_FAILURE; + } + textbox_setup (); + + x11_late_setup (); + // Setup signal handling sources. // SIGINT g_unix_signal_add ( SIGINT, main_loop_signal_handler_int, NULL ); g_idle_add ( startup, NULL ); - // Pidfile + visuals - int pfd = setup (); - if ( pfd < 0 ) { - return EXIT_FAILURE; - } // Start mainloop. g_main_loop_run ( main_loop ); teardown ( pfd ); |