This commit is contained in:
Dave Davenport 2016-03-05 11:34:44 +01:00
parent c0690c8afb
commit 5effc9581c
1 changed files with 13 additions and 30 deletions

View File

@ -255,14 +255,6 @@ void rofi_view_free ( RofiViewState *state )
{ {
// Do this here? // Do this here?
// Wait for final release? // Wait for final release?
#if 0
if ( !state->skip_absorb ) {
XEvent ev;
do {
XNextEvent ( display, &ev );
} while ( ev.type != KeyRelease );
}
#endif
textbox_free ( state->text ); textbox_free ( state->text );
textbox_free ( state->prompt_tb ); textbox_free ( state->prompt_tb );
textbox_free ( state->case_indicator ); textbox_free ( state->case_indicator );
@ -439,10 +431,8 @@ static void filter_elements ( thread_state *t, G_GNUC_UNUSED gpointer user_data
{ {
// input changed // input changed
for ( unsigned int i = t->start; i < t->stop; i++ ) { for ( unsigned int i = t->start; i < t->stop; i++ ) {
int match = mode_token_match ( t->state->sw, t->tokens, int match = mode_token_match ( t->state->sw, t->tokens, t->state->lines_not_ascii[i],
t->state->lines_not_ascii[i], config.case_sensitive, i );
config.case_sensitive,
i );
// If each token was matched, add it to list. // If each token was matched, add it to list.
if ( match ) { if ( match ) {
t->state->line_map[t->start + t->count] = i; t->state->line_map[t->start + t->count] = i;
@ -474,26 +464,19 @@ static void check_is_ascii ( thread_state *t, G_GNUC_UNUSED gpointer user_data )
static xcb_window_t __create_window ( MenuFlags menu_flags ) static xcb_window_t __create_window ( MenuFlags menu_flags )
{ {
uint32_t selmask = XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP; uint32_t selmask = XCB_CW_BACK_PIXEL | XCB_CW_BORDER_PIXEL | XCB_CW_EVENT_MASK | XCB_CW_COLORMAP;
uint32_t selval[] = uint32_t selval[] = {
{ 0, 0,
0, 0,
XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE | XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_BUTTON_PRESS | XCB_EVENT_MASK_BUTTON_RELEASE |
XCB_EVENT_MASK_KEY_RELEASE | XCB_EVENT_MASK_STRUCTURE_NOTIFY | XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_BUTTON_1_MOTION, map }; XCB_EVENT_MASK_KEY_PRESS | XCB_EVENT_MASK_KEY_RELEASE | XCB_EVENT_MASK_STRUCTURE_NOTIFY |
XCB_EVENT_MASK_FOCUS_CHANGE | XCB_EVENT_MASK_BUTTON_1_MOTION,
map
};
xcb_window_t box = xcb_generate_id ( xcb->connection ); xcb_window_t box = xcb_generate_id ( xcb->connection );
xcb_create_window ( xcb->connection, xcb_create_window ( xcb->connection, depth->depth, box, xcb_stuff_get_root_window ( xcb ),
depth->depth, 0, 0, 200, 100, 0, XCB_WINDOW_CLASS_INPUT_OUTPUT,
box, visual->visual_id, selmask, selval );
xcb_stuff_get_root_window ( xcb ),
0,
0,
200,
100,
0,
XCB_WINDOW_CLASS_INPUT_OUTPUT,
visual->visual_id,
selmask,
selval );
CacheState.surface = cairo_xcb_surface_create ( xcb->connection, box, visual, 200, 100 ); CacheState.surface = cairo_xcb_surface_create ( xcb->connection, box, visual, 200, 100 );
// Create a drawable. // Create a drawable.