diff --git a/include/xcb.h b/include/xcb.h index d674e409..946fba61 100644 --- a/include/xcb.h +++ b/include/xcb.h @@ -98,18 +98,6 @@ extern const char *netatom_names[]; /** atoms */ extern xcb_atom_t netatoms[NUM_NETATOMS]; -/** - * @param w rofis window - * - * Stores old input focus for reverting and set focus to rofi. - */ -void rofi_xcb_set_input_focus(xcb_window_t w); - -/** - * IF set, revert the focus back to the original applications. - */ -void rofi_xcb_revert_input_focus(void); - /** * Depth of visual */ diff --git a/source/wayland/display.c b/source/wayland/display.c index 058980fb..22755fe8 100644 --- a/source/wayland/display.c +++ b/source/wayland/display.c @@ -341,8 +341,6 @@ static void wayland_frame_callback(void *data, struct wl_callback *callback, static void wayland_keyboard_keymap(void *data, struct wl_keyboard *keyboard, enum wl_keyboard_keymap_format format, int32_t fd, uint32_t size) { - wayland_seat *self = data; - if (format != WL_KEYBOARD_KEYMAP_FORMAT_XKB_V1) { close(fd); return; diff --git a/source/wayland/view.c b/source/wayland/view.c index 796b53ab..24e9dc90 100644 --- a/source/wayland/view.c +++ b/source/wayland/view.c @@ -215,35 +215,6 @@ static void wayland_rofi_view_queue_redraw(void) { } } -/** - * Thread state for workers started for the view. - */ -typedef struct _thread_state_view { - /** Generic thread state. */ - thread_state st; - - /** Condition. */ - GCond *cond; - /** Lock for condition. */ - GMutex *mutex; - /** Count that is protected by lock. */ - unsigned int *acount; - - /** Current state. */ - RofiViewState *state; - /** Start row for this worker. */ - unsigned int start; - /** Stop row for this worker. */ - unsigned int stop; - /** Rows processed. */ - unsigned int count; - - /** Pattern input to filter. */ - const char *pattern; - /** Length of pattern. */ - glong plen; -} thread_state_view; - static void wayland___create_window(MenuFlags menu_flags) { input_history_initialize(); diff --git a/source/xcb/display.c b/source/xcb/display.c index e7459cbd..7e12cd67 100644 --- a/source/xcb/display.c +++ b/source/xcb/display.c @@ -1491,39 +1491,6 @@ static gboolean main_loop_x11_event_handler(xcb_generic_event_t *ev, return G_SOURCE_CONTINUE; } -void rofi_xcb_set_input_focus(xcb_window_t w) { - if (config.steal_focus != TRUE) { - xcb->focus_revert = 0; - return; - } - xcb_generic_error_t *error; - xcb_get_input_focus_reply_t *freply; - xcb_get_input_focus_cookie_t fcookie = xcb_get_input_focus(xcb->connection); - freply = xcb_get_input_focus_reply(xcb->connection, fcookie, &error); - if (error != NULL) { - g_warning("Could not get input focus (error %d), will revert focus to best " - "effort", - error->error_code); - free(error); - xcb->focus_revert = 0; - } else { - xcb->focus_revert = freply->focus; - } - xcb_set_input_focus(xcb->connection, XCB_INPUT_FOCUS_POINTER_ROOT, w, - XCB_CURRENT_TIME); - xcb_flush(xcb->connection); -} - -void rofi_xcb_revert_input_focus(void) { - if (xcb->focus_revert == 0) { - return; - } - - xcb_set_input_focus(xcb->connection, XCB_INPUT_FOCUS_POINTER_ROOT, - xcb->focus_revert, XCB_CURRENT_TIME); - xcb_flush(xcb->connection); -} - static int take_pointer(xcb_window_t w, int iters) { int i = 0; while (TRUE) {