mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Extra cleanup at exit.
This commit is contained in:
parent
284b3cb78b
commit
ad53de507c
2 changed files with 26 additions and 0 deletions
|
@ -288,8 +288,32 @@ static void cleanup ()
|
|||
g_main_loop_unref ( main_loop );
|
||||
main_loop = NULL;
|
||||
}
|
||||
// XKB Cleanup
|
||||
//
|
||||
if ( xkb.compose.state != NULL ) {
|
||||
xkb_compose_state_unref ( xkb.compose.state );
|
||||
xkb.compose.state = NULL;
|
||||
}
|
||||
if ( xkb.compose.table != NULL ) {
|
||||
xkb_compose_table_unref ( xkb.compose.table );
|
||||
xkb.compose.table = NULL;
|
||||
}
|
||||
if ( xkb.state != NULL ) {
|
||||
xkb_state_unref ( xkb.state );
|
||||
xkb.state = NULL;
|
||||
}
|
||||
if ( xkb.keymap != NULL ) {
|
||||
xkb_keymap_unref ( xkb.keymap );
|
||||
xkb.keymap = NULL;
|
||||
}
|
||||
if ( xkb.context != NULL ) {
|
||||
xkb_context_unref ( xkb.context );
|
||||
xkb.context = NULL;
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
xcb_stuff_wipe ( xcb );
|
||||
|
||||
// Cleaning up memory allocated by the Xresources file.
|
||||
config_xresource_free ();
|
||||
for ( unsigned int i = 0; i < num_modi; i++ ) {
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/randr.h>
|
||||
#include <xcb/xcb_ewmh.h>
|
||||
#include "xcb-internal.h"
|
||||
#include "xcb.h"
|
||||
#include "settings.h"
|
||||
|
@ -882,6 +883,7 @@ void xcb_stuff_wipe ( xcb_stuff *xcb )
|
|||
}
|
||||
x11_monitors_free ();
|
||||
xcb_disconnect ( xcb->connection );
|
||||
xcb_ewmh_connection_wipe ( &( xcb->ewmh ) );
|
||||
xcb->connection = NULL;
|
||||
xcb->screen = NULL;
|
||||
xcb->screen_nbr = 0;
|
||||
|
|
Loading…
Reference in a new issue