diff options
author | zachir <zachir@librem.one> | 2023-02-20 02:51:03 -0600 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-02-20 02:51:03 -0600 |
commit | 3eb31f62dbac02f0a62e3bdb5d2cd35820b1e046 (patch) | |
tree | f5532e177f9e78b9263f489e46f3fde6210d71f0 /x.c | |
parent | 75110c3cdea1cade7a9b097806cae1a32f8a5e8a (diff) |
Revert "add hidecursor patch"
This reverts commit a7a057493c31ec79a88cb54de53da6a51bf995c7.
Diffstat (limited to 'x.c')
-rw-r--r-- | x.c | 31 |
1 files changed, 3 insertions, 28 deletions
@@ -110,11 +110,6 @@ typedef struct { Draw draw; Visual *vis; XSetWindowAttributes attrs; - /* Here, we use the term *pointer* to differentiate the cursor - * one sees when hovering the mouse over the terminal from, e.g., - * a green rectangle where text would be entered. */ - Cursor vpointer, bpointer; /* visible and hidden pointers */ - int pointerisvisible; int scr; int isfixed; /* is fixed geometry? */ int depth; /* bit depth */ @@ -738,13 +733,6 @@ brelease(XEvent *e) void bmotion(XEvent *e) { - if (!xw.pointerisvisible) { - XDefineCursor(xw.dpy, xw.win, xw.vpointer); - xw.pointerisvisible = 1; - if (!IS_SET(MODE_MOUSEMANY)) - xsetpointermotion(0); - } - if (IS_SET(MODE_MOUSE) && !(e->xbutton.state & forcemousemod)) { mousereport(e); return; @@ -1271,7 +1259,6 @@ xinit(int cols, int rows) Window parent; pid_t thispid = getpid(); XColor xmousefg, xmousebg; - Pixmap blankpm; XWindowAttributes attr; XVisualInfo vis; @@ -1346,9 +1333,8 @@ xinit(int cols, int rows) } /* white cursor, black outline */ - xw.pointerisvisible = 1; - xw.vpointer = XCreateFontCursor(xw.dpy, mouseshape); - XDefineCursor(xw.dpy, xw.win, xw.vpointer); + cursor = XCreateFontCursor(xw.dpy, mouseshape); + XDefineCursor(xw.dpy, xw.win, cursor); if (XParseColor(xw.dpy, xw.cmap, colorname[mousefg], &xmousefg) == 0) { xmousefg.red = 0xffff; @@ -1362,10 +1348,7 @@ xinit(int cols, int rows) xmousebg.blue = 0x0000; } - XRecolorCursor(xw.dpy, xw.vpointer, &xmousefg, &xmousebg); - blankpm = XCreateBitmapFromData(xw.dpy, xw.win, &(char){0}, 1, 1); - xw.bpointer = XCreatePixmapCursor(xw.dpy, blankpm, blankpm, - &xmousefg, &xmousebg, 0, 0); + XRecolorCursor(xw.dpy, cursor, &xmousefg, &xmousebg); xw.xembed = XInternAtom(xw.dpy, "_XEMBED", False); xw.wmdeletewin = XInternAtom(xw.dpy, "WM_DELETE_WINDOW", False); @@ -1922,8 +1905,6 @@ unmap(XEvent *ev) void xsetpointermotion(int set) { - if (!set && !xw.pointerisvisible) - return; MODBIT(xw.attrs.event_mask, set, PointerMotionMask); XChangeWindowAttributes(xw.dpy, xw.win, CWEventMask, &xw.attrs); } @@ -2053,12 +2034,6 @@ kpress(XEvent *ev) Status status; Shortcut *bp; - if (xw.pointerisvisible) { - XDefineCursor(xw.dpy, xw.win, xw.bpointer); - xsetpointermotion(1); - xw.pointerisvisible = 0; - } - if (IS_SET(MODE_KBDLOCK)) return; |