From: Fernando Tarlá Cardoso Lemos Date: Sat, 5 Feb 2011 16:23:02 +0000 (-0200) Subject: Fix libxcursor -> xcb cursors fallback. X-Git-Tag: tree-pr2~61 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9cf48f17bbd1ada665d11891e5f388b6ce9e2136;p=i3%2Fi3 Fix libxcursor -> xcb cursors fallback. --- diff --git a/src/xcursor.c b/src/xcursor.c index cd80aa68..ee77d0c1 100644 --- a/src/xcursor.c +++ b/src/xcursor.c @@ -17,17 +17,17 @@ static const int xcb_cursors[XCURSOR_CURSOR_MAX] = { XCB_CURSOR_SB_V_DOUBLE_ARROW }; -static Cursor load_cursor(const char *name, int font) { +static Cursor load_cursor(const char *name) { Cursor c = XcursorLibraryLoadCursor(xlibdpy, name); if (c == None) - c = XCreateFontCursor(xlibdpy, font); + xcursor_supported = false; return c; } void xcursor_load_cursors() { - cursors[XCURSOR_CURSOR_POINTER] = load_cursor("left_ptr", XC_left_ptr); - cursors[XCURSOR_CURSOR_RESIZE_HORIZONTAL] = load_cursor("sb_h_double_arrow", XC_sb_h_double_arrow); - cursors[XCURSOR_CURSOR_RESIZE_VERTICAL] = load_cursor("sb_v_double_arrow", XC_sb_v_double_arrow); + cursors[XCURSOR_CURSOR_POINTER] = load_cursor("left_ptr"); + cursors[XCURSOR_CURSOR_RESIZE_HORIZONTAL] = load_cursor("sb_h_double_arrow"); + cursors[XCURSOR_CURSOR_RESIZE_VERTICAL] = load_cursor("sb_v_double_arrow"); } Cursor xcursor_get_cursor(enum xcursor_cursor_t c) {