Assume xcb_cursor_context_new never fails (#3955)
According to libxcb-cursor code, the only condition in which xcb_cursor_context_new() returns a non-zero result is a memory allocation failure[1]. Thus, it is safe to assume that xcursor_supported is always true, and remove dead code. [1]: https://gitlab.freedesktop.org/xorg/lib/libxcb-cursor/blob/0.1.3/cursor/cursor.c#L131-132
This commit is contained in:
@ -175,7 +175,7 @@ drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event,
|
||||
xcb_window_t confine_to, int cursor,
|
||||
bool use_threshold, callback_t callback,
|
||||
const void *extra) {
|
||||
xcb_cursor_t xcursor = (cursor && xcursor_supported) ? xcursor_get_cursor(cursor) : XCB_NONE;
|
||||
xcb_cursor_t xcursor = cursor ? xcursor_get_cursor(cursor) : XCB_NONE;
|
||||
|
||||
/* Grab the pointer */
|
||||
xcb_grab_pointer_cookie_t cookie;
|
||||
|
Reference in New Issue
Block a user