summaryrefslogtreecommitdiffstats
path: root/src/cmd/devdraw
Commit message (Collapse)AuthorAgeFilesLines
* devdraw: Fix mouse wheel scrolling in 1-tick increments on macOSzakkor2023-03-291-3/+3
|
* devdraw/x11: fix modifier key handling for some XkbOptionsXiao-Yong Jin2022-07-261-12/+31
| | | | | | | | | | | | | Certain XkbOptions in X11 would change keysyms for modifier keys between the key press and key release. For example, under the XkbOptions "grp:shifts_toggle", though shift keys remain Shift_L/R when pressed, they become ISO_Group_Next/Prev when released. This behavior makes devdraw unable to detect the release event correctly and as a result mouse button 1 click always interpreted as button 3 event after a shift key is used.
* stats: add threadmaybackgroundRuss Cox2021-01-051-1/+4
|
* devdraw: add /usr/X11R7 for NetBSDRuss Cox2020-12-301-0/+2
| | | | Fixes #362.
* devdraw, libdraw: fix memory leaks by freeing getns() malloced string (#431)Igor Böhm2020-07-221-2/+6
|
* devdraw: accept 5- and 6-byte Unicode hex valuesRuss Cox2020-05-291-8/+31
| | | | | | Alt X 1234 for U+1234 Alt X X 12345 for U+12345 Alt X X X 103456 for U+103456.
* devdraw, libdraw: handle keyboard runes > U+FFFFRuss Cox2020-05-182-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.
* devdraw: use indirect impl interface in x11Gabriel Diaz2020-05-181-0/+21
|
* devdraw: use global drawlk instead of per-clientRuss Cox2020-05-173-18/+20
| | | | Setting up for a real window system.
* devdraw: use indirect impl interfaceRuss Cox2020-05-174-30/+61
| | | | Setting up for a real window system.
* devdraw: fix `cmd-r` to toggle retina vs. non-retina mode on macOS (#361)Martin Palma2020-02-031-1/+1
| | | | | and not unexpectedly quitting an application. Fixes #360
* devdraw: abort alt sequence on window change on macOSRuss Cox2020-01-161-0/+4
| | | | Fixes #3.
* devdraw: avoid deadlock in x11 resizeRuss Cox2020-01-152-0/+3
| | | | Fixes #347.
* devdraw: set windowrect correctly on x11 if window gets unexpected sizeRuss Cox2020-01-151-2/+2
| | | | Fixes #54.
* devdraw: actually send resize event on resizeRuss Cox2020-01-151-0/+7
| | | | | Fixes #340. Fixes #343.
* devdraw: notify window resize promptly on x11Russ Cox2020-01-145-13/+28
| | | | Fixes #339.
* devdraw: do not force-hide menu and dock during full screen on macRuss Cox2020-01-141-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.
* devdraw: hide dock in full screen modeRuss Cox2020-01-131-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.
* devdraw: correctly hide Mac menu bar (#335)Xiao-Yong2020-01-131-9/+9
| | | | `window:willUseFullScreenPresentationOptions:` is an instance method of the protocol `NSWindowDelegate`.
* devdraw: AUTOFRAMEWORK CoreFoundation on macOSRuss Cox2020-01-131-0/+1
| | | | Fixes #273.
* devdraw: x11 working againRuss Cox2020-01-1314-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.
* devdraw: multiclient modeRuss Cox2020-01-133-42/+115
|
* devdraw: more cleanup, clearer lockingRuss Cox2020-01-138-313/+329
|
* devdraw: refactor, clean up mac screenRuss Cox2020-01-137-505/+492
| | | | | Also turn mac-srv.c into a generic srv.c, so we can remove the duplication with x11-srv.c.
* devdraw: move per-window globals in mac-screen.m into ClientRuss Cox2020-01-133-62/+81
|
* devdraw: move Client into devdraw.h and move global state inRuss Cox2020-01-1310-464/+470
|
* devdraw: use consistent mac-* prefix on macOS filesRuss Cox2020-01-136-195/+5
| | | | We were using osx- and cocoa- but it's not even OS X anymore.
* devdraw: can use libthread directly now on macOSRuss Cox2020-01-135-79/+13
|
* devdraw: simplify mac file namesRuss Cox2020-01-134-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.
* devdraw: drop pre-metal macOS supportRuss Cox2020-01-133-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.
* devdraw: update drawclient test program to run againRuss Cox2020-01-132-9/+8
|
* Trivial changes: whitespace and modes.Dan Cross2020-01-1023-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>
* devdraw: cocoa metal screen adds a delayed update (#270)Xiao-Yong2019-06-191-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.
* devdraw: handle windowDidResize on macOS (#212)Pocket78782019-06-111-1/+7
| | | | This supports non-live window resize.
* devdraw: cocoa metal screen updates (#215)Xiao-Yong2019-05-171-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
* devdraw: stop redirecting ^H in cocoa-metal (#209)Xiao-Yong2019-04-051-1/+0
|
* libdraw,devdraw: fix compatibility with old 16x16 cursor protocol (#217)Fazlul Shahriar2019-04-052-0/+9
| | | | Some libraries that depend on devdraw don't know about 32x32 cursor -- mainly 9fans.net/go/draw.
* devdraw: prefer low-power GPU for macOS metal rendering (#231)Chris Schultz2019-04-051-2/+13
|
* devdraw: avoid deadlock on pre-Mojave macOSRuss Cox2019-04-051-0/+6
|
* devdraw: fix cocoa metal _flushmemscreen for invalid rectangles (#240)Xiao-Yong2019-04-051-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.
* devdraw: respond to windowDidBecomeKey on darwin (#239)Jacob Vosmaer2019-04-051-0/+5
| | | | Fixes bug where devdraw does not "notice" mouse position after task switch. Fixes https://github.com/9fans/plan9port/issues/232.
* devdraw: remove os x 10.5 compatibility codeJacob Vosmaer2018-11-154-1790/+2
|
* devdraw: add Cursor2 support on macOS 10.14 MojaveRuss Cox2018-11-158-45/+113
| | | | | This replaces the pixel-art scaling algorithm used for upscaling before. The results were not crisp enough to serve as everyday cursors.
* devdraw: rewrite the Cocoa screen using MetalXiao-Yong Jin2018-11-158-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.
* devdraw: set displaydpi on devdraw x11 attach (#178)Gabriel Díaz2018-11-141-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.
* devdraw: make ctrl generate 1-click while mouse down (#119)Xiao-Yong2018-11-131-0/+2
| | | This makes 2-1 chords possible with touchpad on a mac laptop.
* devdraw: fix some memory leaks in x11Xiao-Yong Jin2018-03-272-1/+5
|
* devdraw: fix build on macOS < 10.12Rudá Moura2017-10-091-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.
* devdraw: fix Mac Kcmd+ShiftRuss Cox2017-07-161-0/+3
| | | | | | Change-Id: Ide32a9397701085b17fbd42f0866eb3de11e4190 Reviewed-on: https://plan9port-review.googlesource.com/2940 Reviewed-by: Russ Cox <rsc@swtch.com>
* all: fix or silence all INSTALL warnings on macOSRuss Cox2017-01-063-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>