aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
AgeCommit message (Collapse)AuthorFilesLines
2020-12-30devdraw: add /usr/X11R7 for NetBSDRuss Cox1-0/+2
Fixes #362.
2020-07-22devdraw, libdraw: fix memory leaks by freeing getns() malloced string (#431)Igor Böhm1-2/+6
2020-05-29devdraw: accept 5- and 6-byte Unicode hex valuesRuss Cox1-8/+31
Alt X 1234 for U+1234 Alt X X 12345 for U+12345 Alt X X X 103456 for U+103456.
2020-05-18devdraw, libdraw: handle keyboard runes > U+FFFFRuss Cox2-3/+8
Runes in Plan 9 were limited to the 16-bit BMP when I drew up the RPC protocol between graphical programs and devdraw a long time ago. Now that they can be 32-bit, use a 32-bit wire encoding too. A new message number to avoid problems with other clients (like 9fans.net/go). Add keyboard shortcut alt : , for U+1F602, face with tears of joy, to test that it all works.
2020-05-18devdraw: use indirect impl interface in x11Gabriel Diaz1-0/+21
2020-05-17devdraw: use global drawlk instead of per-clientRuss Cox3-18/+20
Setting up for a real window system.
2020-05-17devdraw: use indirect impl interfaceRuss Cox4-30/+61
Setting up for a real window system.
2020-02-03devdraw: fix `cmd-r` to toggle retina vs. non-retina mode on macOS (#361)Martin Palma1-1/+1
and not unexpectedly quitting an application. Fixes #360
2020-01-16devdraw: abort alt sequence on window change on macOSRuss Cox1-0/+4
Fixes #3.
2020-01-15devdraw: avoid deadlock in x11 resizeRuss Cox2-0/+3
Fixes #347.
2020-01-15devdraw: set windowrect correctly on x11 if window gets unexpected sizeRuss Cox1-2/+2
Fixes #54.
2020-01-15devdraw: actually send resize event on resizeRuss Cox1-0/+7
Fixes #340. Fixes #343.
2020-01-14devdraw: notify window resize promptly on x11Russ Cox5-13/+28
Fixes #339.
2020-01-14devdraw: do not force-hide menu and dock during full screen on macRuss Cox1-3/+15
This hides the menu on dock on all screens which is more than we want. The code was added to fix a problem with Catalina that I can no longer reproduce, so I guess it works now. Fixes #336.
2020-01-13devdraw: hide dock in full screen modeRuss Cox1-0/+13
Unfortunately this hides the dock even if it is on a different screen. We need to figure out how to tell. But this is more usable than not. Probably.
2020-01-13devdraw: correctly hide Mac menu bar (#335)Xiao-Yong1-9/+9
`window:willUseFullScreenPresentationOptions:` is an instance method of the protocol `NSWindowDelegate`.
2020-01-13devdraw: AUTOFRAMEWORK CoreFoundation on macOSRuss Cox1-0/+1
Fixes #273.
2020-01-13devdraw: x11 working againRuss Cox14-2340/+1844
Need to think a bit more about locking, but overall it's a working devdraw. Multiclient mode may not be working but nothing is using it yet.
2020-01-13devdraw: multiclient modeRuss Cox3-42/+115
2020-01-13devdraw: more cleanup, clearer lockingRuss Cox8-313/+329
2020-01-13devdraw: refactor, clean up mac screenRuss Cox7-505/+492
Also turn mac-srv.c into a generic srv.c, so we can remove the duplication with x11-srv.c.
2020-01-13devdraw: move per-window globals in mac-screen.m into ClientRuss Cox3-62/+81
2020-01-13devdraw: move Client into devdraw.h and move global state inRuss Cox10-464/+470
2020-01-13devdraw: use consistent mac-* prefix on macOS filesRuss Cox6-195/+5
We were using osx- and cocoa- but it's not even OS X anymore.
2020-01-13devdraw: can use libthread directly now on macOSRuss Cox5-79/+13
2020-01-13devdraw: simplify mac file namesRuss Cox4-98/+5
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-13devdraw: drop pre-metal macOS supportRuss Cox3-1688/+5
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-13devdraw: update drawclient test program to run againRuss Cox2-9/+8
2020-01-10Trivial changes: whitespace and modes.Dan Cross23-150/+129
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-06-19devdraw: cocoa metal screen adds a delayed update (#270)Xiao-Yong1-0/+7
The immediate display of the screen sometimes miss the update from the CPU side memory. No obvious synchronization mechanism is available. In order to make sure the screen updates properly, we set needsDisplay again after 16ms delay to ensure a second screen update.
2019-06-11devdraw: handle windowDidResize on macOS (#212)Pocket78781-1/+7
This supports non-live window resize.
2019-05-17devdraw: cocoa metal screen updates (#215)Xiao-Yong1-63/+27
* devdraw: cocoa metal screen uses a dirty hack to make everything smooth * devdraw: cocoa metal screen uses a layer to make fullscreen applications behave * devdraw: macOS cocoa metal fix resizeimg without img * devdraw: macOS cocoa metal uses blit instead of render We directly use the blit command encoder to copy texture to the framebuffer. We no longer need to compile the metal shader every time the application starts just for rendering a flat 2D surface. * travis: add osx images covering 10.13 and 10.14
2019-04-05devdraw: stop redirecting ^H in cocoa-metal (#209)Xiao-Yong1-1/+0
2019-04-05libdraw,devdraw: fix compatibility with old 16x16 cursor protocol (#217)Fazlul Shahriar2-0/+9
Some libraries that depend on devdraw don't know about 32x32 cursor -- mainly 9fans.net/go/draw.
2019-04-05devdraw: prefer low-power GPU for macOS metal rendering (#231)Chris Schultz1-2/+13
2019-04-05devdraw: avoid deadlock on pre-Mojave macOSRuss Cox1-0/+6
2019-04-05devdraw: fix cocoa metal _flushmemscreen for invalid rectangles (#240)Xiao-Yong1-0/+4
It is possible to receive multiple screen resize events, and resizeimg would be called for different sizes, before _flushmemscreen actually gets called with rectangle sizes different from the most recent resizeimg call. The size mismatch would trigger illegal memory access inside _flushmemscreen. This commit protects _flushmemscreen by returning early if the requested rectangle is outside of the current texture rectangle.
2019-04-05devdraw: respond to windowDidBecomeKey on darwin (#239)Jacob Vosmaer1-0/+5
Fixes bug where devdraw does not "notice" mouse position after task switch. Fixes https://github.com/9fans/plan9port/issues/232.
2018-11-15devdraw: remove os x 10.5 compatibility codeJacob Vosmaer4-1790/+2
2018-11-15devdraw: add Cursor2 support on macOS 10.14 MojaveRuss Cox8-45/+113
This replaces the pixel-art scaling algorithm used for upscaling before. The results were not crisp enough to serve as everyday cursors.
2018-11-15devdraw: rewrite the Cocoa screen using MetalXiao-Yong Jin8-21/+1307
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-14devdraw: set displaydpi on devdraw x11 attach (#178)Gabriel Díaz1-2/+7
See https://plan9port-review.googlesource.com/c/plan9/+/1470 for discussion of the approach, especially Michael Stapleberg's comment: Note that chromium, firefox and others have tried this and then switched to using the Xft.dpi X resource, see e.g. https://code.google.com/p/chromium/codesearch#chromium/src/chrome/browser/ui/libgtk2ui/gtk2_ui.cc and especially http://sources.debian.net/src/gnome-settings-daemon/3.18.2-1/plugins/xsettings/gsd-xsettings-manager.c/?hl=824#L80 for some anecdata about why this approach doesn’t work out. The Xft.dpi resource is being set accurately by desktop environments (GNOME, KDE, …) and can easily be changed by users of niche window managers by editing ~/.Xresources. I suggest we check only Xft.dpi, without considering the DPI environment variable or the monitor width/height.
2018-11-13devdraw: make ctrl generate 1-click while mouse down (#119)Xiao-Yong1-0/+2
This makes 2-1 chords possible with touchpad on a mac laptop.
2018-03-27devdraw: fix some memory leaks in x11Xiao-Yong Jin2-1/+5
2017-10-09devdraw: fix build on macOS < 10.12Rudá Moura1-0/+2
After making the build on macOS silent on commit 310ae03, the build was broken on macOS lesser than 10.12 (Sierra). This commit conditionally checks the version the of the SDK before using the defined values for silent build. Fixes #66.
2017-07-16devdraw: fix Mac Kcmd+ShiftRuss Cox1-0/+3
Change-Id: Ide32a9397701085b17fbd42f0866eb3de11e4190 Reviewed-on: https://plan9port-review.googlesource.com/2940 Reviewed-by: Russ Cox <rsc@swtch.com>
2017-01-06all: fix or silence all INSTALL warnings on macOSRuss Cox3-63/+85
Should be a clean build now. Change-Id: Id3460371cb5e8d4071f8faa9c2aec870d213a067 Reviewed-on: https://plan9port-review.googlesource.com/2781 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-11-11devdraw: cocoa: set window title on main threadsqweek1-2/+12
Change-Id: Ie818f9246f749a9d3293019a1e01be4ce7e368b9 Reviewed-on: https://plan9port-review.googlesource.com/1400 Reviewed-by: Russ Cox <rsc@swtch.com>
2015-06-03devdraw: plumb drag-n-dropped filesmarius a. eriksen1-0/+39
Change-Id: I7585870aee57c7482ebdd19c117be7982123ce79 Reviewed-on: https://plan9port-review.googlesource.com/1130 Reviewed-by: Russ Cox <rsc@google.com>
2015-02-17devdraw: enable retina behavior by default on OS XRuss Cox1-3/+3
Change-Id: I243a1fe3f9ec0841570c4cd69c02be9cfd9ade50 Reviewed-on: https://plan9port-review.googlesource.com/1172 Reviewed-by: Russ Cox <rsc@swtch.com>