62 lines
1.8 KiB
Diff
62 lines
1.8 KiB
Diff
|
|
--- a/config.def.h
|
||
|
|
+++ b/config.def.h
|
||
|
|
@@ -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 <X11/Xatom.h>
|
||
|
|
#include <X11/Xresource.h>
|
||
|
|
#include <X11/cursorfont.h>
|
||
|
|
+#include <X11/Xcursor/Xcursor.h>
|
||
|
|
|
||
|
|
#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'");
|