aboutsummaryrefslogtreecommitdiff
path: root/src/libdraw
AgeCommit message (Collapse)AuthorFilesLines
2020-01-14libdraw: send hangup to process when window is lostRuss Cox1-1/+5
This matches the Plan 9 behavior a bit better. Fixes #30.
2020-01-14libdraw: use proper pipe for default font dataRuss Cox1-6/+16
May fix a deadlock / missing font on OpenBSD. Fixes #308.
2020-01-13libdraw: connect to devdraw via $wsysid when setRuss Cox2-1/+79
2020-01-12libdraw: fix "mk"Russ Cox1-2/+1
Should default to building the library, not getsubfont.o.
2020-01-10Trivial changes: whitespace and modes.Dan Cross27-85/+76
Remote whitespace at the ends of lines. Remove blank lines from the ends of files. Change modes on source files so that they are not executable. Signed-off-by: Dan Cross <cross@gajendra.net>
2019-04-05libdraw,devdraw: fix compatibility with old 16x16 cursor protocol (#217)Fazlul Shahriar2-1/+24
Some libraries that depend on devdraw don't know about 32x32 cursor -- mainly 9fans.net/go/draw.
2018-11-16libdraw: redo default font construction to be hidpi-safeRuss Cox12-497/+372
If $font is not set, the default font is constructed from font data linked into every libdraw binary. That process was different from the usual openfont code, and so it was not hidpi-aware, resulting in very tiny fonts out of the box on hidpi systems, until users set $font. Fix this by using openfont to construct the default font, by recognizing the name *default* when looking for font and subfont file contents. Then all the hidpi scaling applies automatically. As a side effect, the concept of a 'default subfont' is gone, as are display->defaultsubfont, getdefont, and memgetdefont.
2018-11-15libdraw: add Cursor2, a 32x32 high-res cursorRuss Cox6-6/+64
Also add setcursor2, esetcursor2, and draw protocol encoding. Calls to the old setcursor, esetcursor create a 32x32 by pixel doubling when needed.
2018-03-27libdraw: fix error in the previous commitXiao-Yong Jin1-1/+1
2018-03-27libdraw: fix some memory leaks in font handlingXiao-Yong Jin5-6/+18
2017-04-08libdraw: replace hand-rolled realloc, preventing buffer overflow.Ray Lai1-3/+1
The original buffer is f->nsubf*sizeof *subf bytes (oldsize) large. Once it's full, a new buffer of (f->nsubf+DSUBF)*sizeof *subf (newsize) is mallocated. Unfortunately memmove() reads (newsize) bytes from the original (oldsize) buffer, causing a buffer overflow. By switching to realloc(), we don't need to do buffer size calculation, memmoving, and freeing of the original buffer. Change-Id: Ibf85bc06abe1c8275b11acb1d7d346a14291d2cd Reviewed-on: https://plan9port-review.googlesource.com/1520 Reviewed-by: Gleydson Soares <gsoares@gmail.com>
2017-01-069term, win: work around bsd linker nonsenseRuss Cox1-0/+5
Change-Id: Ifcef0636ee1e1fd0f9b06a8d1a99d58fae831318 Reviewed-on: https://plan9port-review.googlesource.com/2780 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-08-27fontsrv: use 64 chars per subfont instead of 256Russ Cox1-1/+1
Makes loading faster, and makes larger sizes not too wide. Change-Id: I076c83fdb9577c1e596de45558f38ea93e3a2a31 Reviewed-on: https://plan9port-review.googlesource.com/1360 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-05-15libdraw, acme: fix acme segfault triggered passing an invalid fontGleydson Soares1-0/+2
acme -f nosuchfont Change-Id: Iaa727db02b43e63082130796ec97c0efb7fe2b19 Reviewed-on: https://plan9port-review.googlesource.com/1220 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: refine hidpi font selectionRuss Cox3-1/+43
Change-Id: Id1e6a2630713024a1925ad1341bb9c846f82e93e Reviewed-on: https://plan9port-review.googlesource.com/1171 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: autoscale fonts when moving between low and high dpi screensRuss Cox7-27/+212
Change-Id: I6093955b222db89dfe437fb723593b173d888d01 Reviewed-on: https://plan9port-review.googlesource.com/1170 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-02-17libdraw: add 2*font syntax for scaled fontsRuss Cox6-4/+75
An experiment. Change-Id: I40660a211b8372701597d80f7e86917e94cccbaa Reviewed-on: https://plan9port-review.googlesource.com/1161 Reviewed-by: Russ Cox <rsc@swtch.com>
2014-12-02libdraw, libframe, acme: fix, guard against inverted range in textsetselectRuss Cox1-0/+3
Credit to Roi Martin <jroi.martin@gmail.com> for noticing that libdraw was being passed a negative string length and for finding the sequence of keystrokes that make acme do it reproducibly. Change-Id: If3f3d04a25c506175f740d3e887d5d83b5cd1bfe Reviewed-on: https://plan9port-review.googlesource.com/1092 Reviewed-by: Russ Cox <rsc@swtch.com>
2012-11-25libdraw: add scalesizeRuss Cox1-0/+7
R=rsc http://codereview.appspot.com/6855092
2012-11-25devdraw, libdraw: add display->dpiRuss Cox1-0/+9
Fixed at 100 right now, but the plan is to make it accurate and then use it. R=rsc http://codereview.appspot.com/6856091
2012-09-17libdraw: add visibleclicks modeRuss Cox3-2/+54
R=rsc http://codereview.appspot.com/6501137
2010-01-28libdraw: allow 32-bit RunesRuss Cox1-1/+1
R=, rsc CC= http://codereview.appspot.com/196054
2009-07-14mergeRuss Cox1-2/+6
2009-07-08mergeRuss Cox3-6/+63
2009-04-30mergeRuss Cox1-0/+9
2008-12-03libdraw: add borderopJeff Sickel1-9/+15
2008-07-01libdraw: do not let devdraw fork, for OS XRuss Cox1-1/+5
2008-06-30libdraw: die if display doesRuss Cox2-3/+3
2008-01-10libdraw: fix spinning event loop (David Bulkow)Russ Cox1-6/+6
2006-11-05block instead of chewing cpu in eread (Lu Xuxiao)rsc1-1/+1
2006-11-04In non-blocking recv functions in libmux and libdraw,rsc2-15/+31
distinguish between "cannot receive without blocking" and "EOF on connection". In libmux, do not elect async guys muxers, so that synchronous RPC calls run in the main event loop (e.g., in eresized) do not get stuck. Fixes problem reported by Lu Xuxiao, namely that jpg etc. would spin at 100% cpu usage.
2006-07-04move USED past decls (Arvindh Tamilmani)rsc1-2/+2
2006-06-26use pinrsc1-1/+27
2006-06-25add iprintrsc2-0/+15
2006-06-25gonersc2-180/+0
2006-06-25eventrsc6-1904/+272
2006-06-25byersc1-43/+0
2006-06-25newrsc4-0/+742
2006-06-25byersc75-11641/+226
2006-05-23fix _screen leakrsc2-15/+8
2006-05-21changes from plan 9rsc2-15/+11
2006-05-20do RFNOTEG in initdraw (Anselm Garbe)rsc1-0/+1
2006-04-21shut up gccrsc1-0/+3
2006-04-04no checksnarfrsc1-11/+0
2006-04-01Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.rsc13-47/+47
2006-03-31fix alpha oopsrsc2-15/+17
2006-03-12regenerate latin1 tablesrsc1-101/+101
2006-03-10jpg fix? (erik quanstrom)rsc1-0/+1
2006-03-10synergy (paul lalonde)rsc1-2/+6
2006-02-28more itrans changesrsc1-12/+1