mirror of https://github.com/davatorium/rofi.git
Extra cleanup at exit.
This commit is contained in:
parent
284b3cb78b
commit
ad53de507c
|
@ -288,8 +288,32 @@ static void cleanup ()
|
||||||
g_main_loop_unref ( main_loop );
|
g_main_loop_unref ( main_loop );
|
||||||
main_loop = NULL;
|
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
|
// Cleanup
|
||||||
xcb_stuff_wipe ( xcb );
|
xcb_stuff_wipe ( xcb );
|
||||||
|
|
||||||
// Cleaning up memory allocated by the Xresources file.
|
// Cleaning up memory allocated by the Xresources file.
|
||||||
config_xresource_free ();
|
config_xresource_free ();
|
||||||
for ( unsigned int i = 0; i < num_modi; i++ ) {
|
for ( unsigned int i = 0; i < num_modi; i++ ) {
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/randr.h>
|
#include <xcb/randr.h>
|
||||||
|
#include <xcb/xcb_ewmh.h>
|
||||||
#include "xcb-internal.h"
|
#include "xcb-internal.h"
|
||||||
#include "xcb.h"
|
#include "xcb.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
@ -882,6 +883,7 @@ void xcb_stuff_wipe ( xcb_stuff *xcb )
|
||||||
}
|
}
|
||||||
x11_monitors_free ();
|
x11_monitors_free ();
|
||||||
xcb_disconnect ( xcb->connection );
|
xcb_disconnect ( xcb->connection );
|
||||||
|
xcb_ewmh_connection_wipe ( &( xcb->ewmh ) );
|
||||||
xcb->connection = NULL;
|
xcb->connection = NULL;
|
||||||
xcb->screen = NULL;
|
xcb->screen = NULL;
|
||||||
xcb->screen_nbr = 0;
|
xcb->screen_nbr = 0;
|
||||||
|
|
Loading…
Reference in New Issue