mirror of
https://github.com/davatorium/rofi.git
synced 2025-04-14 17:43:01 -04:00
Wayland: remove some dead code
Found with Codacy https://app.codacy.com/gh/davatorium/rofi/pull-requests/2099
This commit is contained in:
parent
183b0b5d75
commit
3bec3fac59
4 changed files with 0 additions and 76 deletions
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue