summaryrefslogtreecommitdiff
path: root/sys/src/9/port/devdraw.c
AgeCommit message (Collapse)Author
2023-01-06devdraw: coding style (from drawterm)cinap_lenrek
2022-08-18devvga: fix race condition between writes to vgactlqwx
to reproduce: for(i in `{seq 10}) echo softscreen off >/dev/vgactl
2022-04-02devdraw: printmesg: implement "z" fmt arg (safe since printmesg is disabled)Sigrid Solveig Haflínudóttir
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().
2020-01-12devdraw: fix topnwindows() panic when images are not windows (thanks aiju)cinap_lenrek
Crashes drawterm and native: #include <u.h> #include <libc.h> #include <draw.h> void main(int argc, char **argv) { initdraw(nil, nil, nil); Image *a[] = {screen, display->black}; topnwindows(a, nelem(a)); flushimage(display, 1); }
2019-01-30devdraw: get rid of softscreen==0xa110c hack and make attachscreen() return ↵cinap_lenrek
Memdata* all screen implementations use a Memimage* internally for the framebuffer, so we can return a shared reference to its Memdata structure in attachscreen() instead of a framebuffer data pointer. this eleminates the softscreen == 0xa110c hack as we always use shared Memdata* now.
2019-01-28devdraw: simplify drawgen()cinap_lenrek
2018-08-19devdraw: zero initialize DImage.dscreen pointer (vnc, drawterm)cinap_lenrek
2017-04-29devdraw: ignore drawdebug commandcinap_lenrek
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-02-28devdraw: remove unused Edepth[]cinap_lenrek
2015-01-02devdraw: remove broken color palette blankingcinap_lenrek
the code did not work as drawactive() was called with the drawlock held. instead of fixing, the code for palette blanking has been removed.
2014-02-03devdraw: screenid is BGLONG, not BGSHORTcinap_lenrek
2014-01-14devdraw: fix memory corruption reading draw ctl filecinap_lenrek
when user does read of exactly 12*12 bytes on draw ctl file, the snprint() adds one more \0 byte writing beyond the user buffer and corrupting memory. fix this by not snprint()ing the final space and add it manually.
2013-12-25devdraw: fix drawdelname() string memory leakcinap_lenrek
2012-10-27devdraw: fix stats for #i/winname (thanks jas)cinap_lenrek
2012-02-20devdraw: use QLock to serialize sleep on refresh to prevent double sleepcinap_lenrek
2011-04-11vesa-changescinap_lenrek
2011-03-30Import sources from 2011-03-30 iso image - libTaru Karttunen
2011-03-30Import sources from 2011-03-30 iso imageTaru Karttunen