--- a/config.def.h +++ b/config.def.h @@ -28,4 +28,4 @@ static const float zoom_levels[] = { 12.5, 25.0, 50.0, 75.0, - 100.0, 150.0, 200.0, 400.0, 800.0 + 100.0, 150.0, 200.0, 300.0, 400.0, 600.0, 800.0 }; @@ -191,9 +191,9 @@ static const button_t buttons_img[] = { /* modifiers button function argument */ { 0, 1, i_cursor_navigate, None }, - { ControlMask, 1, i_drag, DRAG_RELATIVE }, { 0, 2, i_drag, DRAG_ABSOLUTE }, - { 0, 3, g_switch_mode, None }, + { 0, 3, i_drag, DRAG_RELATIVE }, + { ControlMask, 3, g_switch_mode, None }, { 0, 4, g_zoom, +1 }, { 0, 5, g_zoom, -1 }, }; --- a/window.c +++ b/window.c @@ -31,6 +31,7 @@ #include #include #include +#include #if HAVE_LIBFONTS #include "utf8.h" @@ -53,15 +54,18 @@ static GC gc; static int barheight; static struct { - int name; + union { + char *name; + int num; + }; Cursor icon; } cursors[CURSOR_COUNT] = { - { XC_left_ptr }, + { "left_ptr" }, { XC_dotbox }, - { XC_fleur }, + { "dnd-move" }, - { XC_watch }, + { "wait" }, - { XC_sb_left_arrow }, + { "left-arrow" }, - { XC_sb_right_arrow } + { "right-arrow" } }; #if HAVE_LIBFONTS @@ -272,7 +276,10 @@ for (i = 0; i < (int)ARRLEN(cursors); i++) { if (i != CURSOR_NONE) - cursors[i].icon = XCreateFontCursor(e->dpy, cursors[i].name); + if (cursors[i].num < 0x100) + cursors[i].icon = XCreateFontCursor(e->dpy, cursors[i].num); + else + cursors[i].icon = XcursorLibraryLoadCursor(e->dpy, cursors[i].name); } if (XAllocNamedColor(e->dpy, e->cmap, "black", &col, &col) == 0) error(EXIT_FAILURE, 0, "Error allocating color 'black'");