commit 4604fc4848832aacc06add1dde07a9bbbfad0899
parent c3e3a16bf44d38db5aa38e0fb9b917add8b3a314
Author: Kyle Milz <krwmilz@gmail.com>
Date: Thu, 9 Sep 2021 01:26:07 +0000
remove drag cursors
This was broken anyways and was a badly done feature.
Diffstat:
3 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/events.c b/events.c
@@ -98,8 +98,6 @@ mouse_proc mouse_release = null_mouse;
#define CURSORWIN XtWindow(form_widget)
-static XColor bg_Color;
-
#define ACTION_DECL(name) \
void name(Widget, XEvent *, String *, Cardinal *)
@@ -1457,20 +1455,6 @@ ACTION(Act_drag)
else
drag_motion(event);
- {
- static Boolean curs_pix_set[3] = {False, False, False};
- static Pixel cursor_pix[3];
-
- if (bg_current != NULL && (!curs_pix_set[drag_flags - 1]
- || cursor_pix[drag_flags - 1] != bg_current->pixel)) {
- XRecolorCursor(DISP, drag_cursor[drag_flags - 1], &cr_Color,
- &bg_Color);
- cursor_pix[drag_flags - 1] = bg_current->pixel;
- curs_pix_set[drag_flags - 1] = True;
- }
- }
-
- XDefineCursor(DISP, CURSORWIN, drag_cursor[drag_flags - 1]);
XFlush(DISP);
dragcurs = True;
}
@@ -2464,12 +2448,6 @@ redraw_page()
bg_current->pixel_good = True;
}
XSetWindowBackground(DISP, mane.win, bg_current->pixel);
-
- bg_Color.pixel = bg_current->pixel;
- Colormap colormap = DefaultColormapOfScreen(SCRN);
- XQueryColor(DISP, colormap, &bg_Color);
- XRecolorCursor(DISP, ready_cursor, &cr_Color, &bg_Color);
- XRecolorCursor(DISP, redraw_cursor, &cr_Color, &bg_Color);
}
dvi_file_ready = True;
diff --git a/xdvi.c b/xdvi.c
@@ -114,8 +114,6 @@ struct _resource resource;
#define hl_Pixel resource._hl_Pixel
#define cr_Pixel resource._cr_Pixel
-XColor cr_Color;
-
struct mg_size_rec mg_size[5] = {{200, 150}, {400, 250}, {700, 500},
{1000, 800}, {1200, 1200}};
diff --git a/xdvi.h b/xdvi.h
@@ -243,9 +243,6 @@ struct bgrec *bg_current = NULL; /* current bg value */
struct fgrec *fg_current; /* current fg value */
struct fgrec *fg_active = NULL; /* where the GCs are */
-/* Cursor color (for XRecolorCursor). */
-extern XColor cr_Color;
-
extern struct mg_size_rec {
int w;
@@ -293,7 +290,7 @@ GC foreGC2;
GC copyGC;
Boolean copy;
-Cursor redraw_cursor, ready_cursor, drag_cursor[3];
+Cursor redraw_cursor, ready_cursor;
Pixel *pixeltbl;
Pixel *pixeltbl_t;