summaryrefslogtreecommitdiff
path: root/sys/src/9/zynq
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2020-04-10 17:12:51 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2020-04-10 17:12:51 +0200
commit1fe3143e4c43ce2c74e0cfdd70b1bd556bbb9e1b (patch)
tree1507caffb47917cb57aeb1382dab568eb833dba2 /sys/src/9/zynq
parent7b309d2e280675b6ce39f9b53cef6577e295c4f4 (diff)
kernel: cleanup the software mouse cursor mess
The swcursor used a 32x32 image for saving/restoring screen contents for no reason. Add a doflush argument to swcursorhide(), so that disabling software cursor with a double buffered softscreen is properly hidden. The doflush parameter should be set to 0 in all other cases as swcursordraw() will flushes both (current and previours) locations. Make sure swcursorinit() and swcursorhide() clear the visibility flag, even when gscreen is nil. Remove the cursor locking and just do everything within the drawlock. All cursor functions such as curson(), cursoff() and setcursor() will be called drawlock locked. This also means &cursor can be read. Fix devmouse cursor reads and writes. We now have the global cursor variable that is only modified under the drawlock. So copy under drawlock. Move the pc software cursor implementation into vgasoft driver, so screen.c does not need to handle it as a special case. Remove unused functions such as drawhasclients().
Diffstat (limited to 'sys/src/9/zynq')
-rw-r--r--sys/src/9/zynq/screen.h19
1 files changed, 2 insertions, 17 deletions
diff --git a/sys/src/9/zynq/screen.h b/sys/src/9/zynq/screen.h
index 1ea1a24d7..fdedeb7c4 100644
--- a/sys/src/9/zynq/screen.h
+++ b/sys/src/9/zynq/screen.h
@@ -1,11 +1,6 @@
-typedef struct Cursor Cursor;
-typedef struct Cursorinfo Cursorinfo;
-struct Cursorinfo {
- Cursor;
- Lock;
-};
-
/* devmouse.c */
+typedef struct Cursor Cursor;
+extern Cursor cursor;
extern void mousetrack(int, int, int, ulong);
extern void absmousetrack(int, int, int, ulong);
extern Point mousexy(void);
@@ -15,9 +10,6 @@ extern int m3mouseputc(Queue*, int);
extern int m5mouseputc(Queue*, int);
extern int mouseputc(Queue*, int);
-extern Cursorinfo cursor;
-extern Cursor arrow;
-
/* mouse.c */
extern void mousectl(Cmdbuf*);
extern void mouseresize(void);
@@ -37,10 +29,3 @@ extern void resetscreenimage(void);
extern QLock drawlock;
#define ishwimage(i) 1 /* for ../port/devdraw.c */
-
-/* swcursor.c */
-void swcursorhide(void);
-void swcursoravoid(Rectangle);
-void swcursordraw(Point);
-void swcursorload(Cursor *);
-void swcursorinit(void);