diff options
author | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-06-01 12:47:52 +0200 |
---|---|---|
committer | Quentin Glidic <sardemff7+git@sardemff7.net> | 2017-06-01 13:26:31 +0200 |
commit | 4792a16593374bc3036ea2bccaf9143cc90af44f (patch) | |
tree | 0c6913d6b05550172c6703bb13ca3dbcb2702f52 /source/xcb.c | |
parent | 2b6c084f324373e118147fc9ee20cd78f0b8bf9e (diff) |
xcb: Hide release details
Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
Diffstat (limited to 'source/xcb.c')
-rw-r--r-- | source/xcb.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/xcb.c b/source/xcb.c index fd5e202e..14ccfe42 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -628,7 +628,7 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN return G_SOURCE_CONTINUE; } -int take_pointer ( xcb_window_t w, int iters ) +static int take_pointer ( xcb_window_t w, int iters ) { int i = 0; while ( TRUE ) { @@ -653,7 +653,8 @@ int take_pointer ( xcb_window_t w, int iters ) } return 0; } -int take_keyboard ( xcb_window_t w, int iters ) + +static int take_keyboard ( xcb_window_t w, int iters ) { int i = 0; while ( TRUE ) { @@ -680,11 +681,11 @@ int take_keyboard ( xcb_window_t w, int iters ) return 0; } -void release_keyboard ( void ) +static void release_keyboard ( void ) { xcb_ungrab_keyboard ( xcb->connection, XCB_CURRENT_TIME ); } -void release_pointer ( void ) +static void release_pointer ( void ) { xcb_ungrab_pointer ( xcb->connection, XCB_CURRENT_TIME ); } @@ -960,6 +961,13 @@ xcb_window_t xcb_stuff_get_root_window ( void ) return xcb->screen->root; } +void x11_early_cleanup ( void ) +{ + release_keyboard ( ); + release_pointer ( ); + xcb_flush ( xcb->connection ); +} + void xcb_stuff_wipe ( void ) { if ( xcb->connection == NULL ) { |