aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/devdraw
Commit message (Collapse)AuthorAgeFilesLines
* cmd/devdraw: handle X11 selections betterScott Schwartz2025-11-041-1/+2
| | | | | | | | | x11-screen.c accepts selection targets with the MIME type "text/plain;charset-UTF8", but it should do so case insensitively. The current code draws an error when working with xfce4-terminal 1.0.4, which sends lower case. To reproduce, run acme, snarf some text, then paste in the terminal. acme will report: acme: cannot handle selection request for 'text/plain;charset=utf-8' (590)
* devdraw: work around XWayland pointer warpingRuss Cox2025-10-091-0/+23
|
* devdraw: fix dangling elseArusekk2025-10-091-2/+2
| | | | | | | | | | | | Because of a dangling else, after adding a name to an image with 'N', it was immediately deleted, resulting in Enoname in response to 'n'. This went mostly unnoticed, since plan9port itself does not use named images, but it can break external applications like truedraw[1]. [1]: https://git.sr.ht/~arusekk/truedraw Fixes: c66b52501b63 ("new draw server")
* config: add $egrepDan Cross2025-07-231-1/+1
| | | | | | | | | | | Introduce a new variable set in $PLAN9/config: $egrep, which is conditionally set to either `egrep` or `grep -E`, based on platform, and use this when we want to invoke `egrep`. This works around the endless warnings from GNU grep stating that `egrep` is deprecated in favor of `grep -E`, when run on e.g. Linux.
* cmd/devdraw: avoid use of X button state fieldRoger Peppe2025-03-291-51/+12
| | | | | | | | | | | | | | | | | | This bug is an intermittent annoyance and does not seem likely to be fixed soon. It means that every so often my acme becomes unusable because it behaves as if a mouse button is permanently set. Avoid that issue by keeping track of mouse button state directly. While we're about it, fix another annoying issue: under Linux the FocusOut event reset the kstate field but not the kbuttons field, meaning that the buttons state could inappropriately persist. This happened occasionally by accident, but was easy to reproduce: with the mouse button held down, drag outside the window and click Alt-Tab to switch away from the window. We see a KeyDown event followed by FocusOut but no KeyUp event. Change-Id: I3708316478c80c41806d7157ae9929c6cd84b662
* devdraw: handle shift of real mouse buttons correctlyRuss Cox2024-06-172-10/+23
|
* acme: shift button 3 for reverse searchRuss Cox2024-06-151-3/+10
| | | | | An experiment. Let's see if it's any good. Also document the Mac conventions in devdraw(3).
* 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.