summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devmouse.c
AgeCommit message (Collapse)Author
2021-07-01devmouse: default to no blanking instead of 30 minute blank timeoutcinap_lenrek
2020-12-08devmouse: remove redundant checkSigrid
2020-04-10kernel: cleanup the software mouse cursor messcinap_lenrek
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().
2018-07-23devmouse: produce signed msec timestamp in /dev/mouse, accept unsigned on writecinap_lenrek
2018-05-08add usb tablet supportaiju
2017-03-18devmouse: refactor screen blanking logiccinap_lenrek
devmouse controls the screen blanking timeout, so move the code there avoiding cross calls between modules. the only function that needs to be provided is blankscreen(), which gets called with drawlock locked. the blank timeout is set thru /dev/mousectl now, so kernels without devvga can set it. blanking now only happens while /dev/mouse is read. so this avoids accidentally blanking the screen on cpu servers that do not have a mouse to unblank it.
2016-12-11devmouse: remove unused static map[] arraycinap_lenrek
2016-12-10devmouse: change msec argument of *mousetrack() to ulongcinap_lenrek
2016-11-29devmouse: various bugfixes, simplifycinap_lenrek
the assumption of only one producer ((abs)moustratrack()) is not true for external mouse events from /dev/mousein, so protect the mouse state and queue with ilock(). get rid of mousecreate(), just use devcreate(). reset cursor when all instances of /dev/mouse and /dev/cursor got closed, instead of also considering /dev/mousectl. the reason is that kbdfs keeps the mousectl file open. so exiting a program that has the cursor changed will properly reset the cursor to arrow. don't access user buffer while holding cursor spinlock! the memory access can fault. theres also no lock needed there, we'r just copying *from* the cursor memory. fix use of strtol(), p will always be set, check for end of string. keep pointer coordinates onscreen (off by one). make lastms() function to get the last millisecond delta of last call for resynchronization. fix msg[3] buffer overflow in m5mouseputc(). get rid of mouseshifted logic, it is not used.
2015-04-07kernel: move arrow cursor definition to port/devmouse.ccinap_lenrek
2013-12-25devmouse: exclude sroll-wheel buttons from differential button handlingcinap_lenrek
preventing wheel buttons 4 and 5 fron getting stuck with multiple input devices.
2013-10-07devmouse: differential handling of /dev/mousein buttonscinap_lenrek
2013-08-27devmouse: fix openmode() handlingcinap_lenrek
openmode() can raise error with invalid mode passed, but we already incremented the exclusive mouse refcount at that point! call openmode() early to avoid this.
2013-04-16mouse: fix cursor redraw to prevent screen blanking (thanks erik)cinap_lenrek
2013-04-14devmouse: remove unneeded reference to kerndatecinap_lenrek
2013-04-14reduce software cursor flickeringcinap_lenrek
the software cursor starts flickering and reacts bumby if a process spends most of its time with drawlock acquired because the timer interrupt thats supposed to redraw the cursor fails to acquire the lock at the time the timer fires. instead of trying to draw the cursor on the screen from a timer interrupt 30 times per second, devmouse now creates a process calling cursoron() and cursoroff() when the cursor needs to be redrawn. this allows the swcursor to schedule a redraw while holding the drawlock in swcursoravoid() and cursoron()/cursoroff() are now able to wait for a qlock (drawlock) because they get called from process context. the overall responsiveness is also improved with this change as the cursor redraw rate isnt limited to 30 times a second anymore.
2013-01-03devmouse: deduplicate some code by using absmousetrack()cinap_lenrek
2012-02-13devmouse: add twitch mousectl commandcinap_lenrek
2011-11-03devmouse: allow multiple writers on /dev/mouseincinap_lenrek
2011-08-17change definition of Chan.create to return a chan like opencinap_lenrek
2011-05-21remove keyboard stuff from other ports, make openssl and python compile on armcinap_lenrek
2011-05-09added absolute movement for mouseinaiju
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen