Commit Graph

24 Commits

Author SHA1 Message Date
Russ Cox
b1a086dee9 devdraw: refactor, clean up mac screen
Also turn mac-srv.c into a generic srv.c,
so we can remove the duplication with x11-srv.c.
2020-01-13 16:46:14 -05:00
Russ Cox
843e5af198 devdraw: move per-window globals in mac-screen.m into Client 2020-01-13 16:46:14 -05:00
Russ Cox
88ed92aa40 devdraw: move Client into devdraw.h and move global state in 2020-01-13 16:46:14 -05:00
Russ Cox
933b98054f devdraw: use consistent mac-* prefix on macOS files
We were using osx- and cocoa- but it's not even OS X anymore.
2020-01-13 16:46:14 -05:00
Russ Cox
ce27d7babd devdraw: can use libthread directly now on macOS 2020-01-13 16:46:14 -05:00
Russ Cox
db20f89c32 devdraw: simplify mac file names
Now that we only have Metal, we can drop the -metal.
Also now that Carbon is gone we can drop the macargv.c,
and then the -objc from object file names.
2020-01-13 16:46:14 -05:00
Russ Cox
f177c0ba18 devdraw: drop pre-metal macOS support
We didn't start using Metal until macOS 10.14,
but it was available on 10.13, which is currently
the oldest Apple-supported version of macOS.
Simplify by deleting the old code.
2020-01-13 16:46:14 -05:00
Jacob Vosmaer
3d6fc088f0 devdraw: remove os x 10.5 compatibility code 2018-11-15 22:03:27 -05:00
Xiao-Yong Jin
9af9ceca26 devdraw: rewrite the Cocoa screen using Metal
Add a new macOS cocoa screen, cocoa-screen-metal.m.
Rewrite the macOS cocoa drawing code to use the builtin runloop,
and use Metal to push pixels with CAMetalLayer.

Remove all of the deprecated code, and simplify some of the logic.
Modify mkwsysrules.sh such that the new code is used only when
the system version is equal or higher than 10.14.

Allow touch events to simulate mouse clicks:
three finger tap for the middle mouse button;
four finger tap for the 2-1 chord.

Support Tresize.

Scale 16x16 Cursor up to 32x32 with an EPX algorithm.

Support macOS input sources including the basic dead keys and the
advanced CJK input methods.

Increase the communication buffers in cocoa-srv.c to allow more
input, especially for long sentences prepared by the macOS input
souces.
2018-11-15 20:39:35 -05:00
Christian Kellermann
1a512ec048 fontsrv: fix build on OpenBSD 5.2
R=rsc
CC=plan9port.codebot
https://codereview.appspot.com/6850108
2012-12-11 12:45:45 -05:00
David Jeannot
ca81de0ae1 Cocoa Devdraw: cursor fix
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/5356050
2011-12-09 22:21:09 -05:00
Russ Cox
b4d0ac9612 devdraw: cocoa fixes, bigarrow support (thanks Marius Eriksen) 2011-10-23 18:47:29 -04:00
Russ Cox
7064acbd10 devdraw: cleanup, fix macargv 2011-10-12 13:18:32 -04:00
Russ Cox
6135b41c7d devdraw: disable Lion warning
R=rsc
http://codereview.appspot.com/5132045
2011-09-26 09:31:19 -07:00
Russ Cox
2860591b68 use cocoa on snow leopard
R=rsc
http://codereview.appspot.com/5146043
2011-09-26 09:27:55 -07:00
Russ Cox
8bc80ada76 devdraw: handle, warn about Lion
R=rsc
http://codereview.appspot.com/5069042
2011-09-19 09:17:38 -04:00
Russ Cox
de2d77683e mkfiles: fix macargv buf
R=rsc
http://codereview.appspot.com/2729042
2010-10-27 19:40:16 -07:00
Russ Cox
afea5fc3fd mac: add 9term.app, Plumb.app
R=rsc
http://codereview.appspot.com/2783041
2010-10-27 18:22:03 -07:00
Russ Cox
100ec44e51 devdraw: add multitouch code from Paul Lalonde
Various tweaks to avoid breaking standard mice,
but probably needs tweaks to work with multitouch
mice again.  Still, it's a start.

R=rsc
CC=plalonde, r
http://codereview.appspot.com/181124
2010-01-04 10:23:35 -08:00
Russ Cox
0a40aeedbf devdraw: default to native gui on OS X 2008-07-09 11:47:44 -04:00
Russ Cox
9142d36228 devdraw: OS X native version 2008-06-30 19:41:08 -04:00
rsc
7e0854dae3 use X11 in /usr if it is there 2006-10-13 13:43:36 +00:00
rsc
fdcd298270 quiet 2006-06-25 21:05:07 +00:00
rsc
c66b52501b new draw server 2006-06-25 19:18:39 +00:00