Commit graph

3946 commits

Author SHA1 Message Date
Ethan Burns
464c522746
Merge branch '9fans:master' into wayland 2025-02-04 21:51:52 -05:00
Ethan Burns
f9430786f0
Merge pull request #3 from droyo/wayland-segfault
Fix unexpected devdraw crashes on sway
2025-02-02 09:11:09 -05:00
David Arroyo
3fdc76f128 Fix unexpected devdraw crashes on sway
I found sway 1.10 and wlroots 0.18.2 will occasionally generate
wl_keyboard::keymap events with an empty keymap. I do not have
a reliable reproduction for this, but it seems to occur when
switching back and forth between workspaces with the keyboard.

This also fixes the issue where devdraw can go into a busy loop if
the compositor goes away and wl_display_dispatch() returns -1.
2025-02-01 22:11:11 +01:00
Anthony Sorace
a5d6857a3b man: don't paginate when using nroff
This tells bin/man to set the register L to very high to avoid pagination
and updates tmac/tmac.an to use that value, if it's set, to set the page
length. This is per Plan 9's rc/bin/man and sys/lib/tmac/tmac.an.
2025-01-29 15:55:23 -05:00
Ethan Burns
5636471dff
Merge pull request #2 from droyo/wl-ack-configure
Fix race condition on attach and mouse tracking after warp
2024-11-28 10:56:46 -05:00
David Arroyo
6dffdd6b08 Fix race condition on attach and mouse track on warp
I tried running the wayland devdraw implementation on Sway 1.10,
wlroots 0.18 and encountered the error:

	xdg_surface#13: error 3: xdg_surface has never been configured

According to https://wayland.app/protocols/xdg-shell#xdg_surface ,
a client must commit a surface without a buffer, *wait* for the first
configure request from the compositor, ack it, and *only then* can
it proceed to attach a buffer to the surface and tell wayland to display it.

This was caused by the following sequence of events:

1. devdraw starts, enters gfx_main
2. `gfx_main` calls `gfx_started`, which spawns the `serveproc` thread
3. `gfx_main` enters `wl_display_dispatch`, flushing any buffered requests to
   the compositor, and enters `wl_display_poll()` to wait for incoming messages
4. `serveproc` calls `rpc_attach`, sets up the surface, and buffers a commit.

The race is between #3 and #4. If #3 happens first, the buffered commit
just sits there until `rpc_flush` is called, which calls `wl_display_flush()`,
but at that point a buffer is attached too quickly for the configure to happen.

This commit fixes the race by adding a `configured` field to the WaylandClient
and using it to guard `rpc_flush`.

In addition, I found that mouse warping, at least in sway, would move
the cursor but future mouse presses would register at the old location
until I moved the mouse. So I added a call to gfx_mousetrack to the end
of `rpc_setmouse`.
2024-11-28 16:30:25 +01:00
Ethan Burns
a3cbe3483f
Merge pull request #1 from ylh/wayland-fdiv
devdraw/wayland.c: prevent divide-by-zero in scroll repeat
2024-10-28 05:31:56 -04:00
ylh
0aa048e818 devdraw/wayland.c: prevent divide-by-zero in scroll repeat 2024-10-27 22:32:09 -07:00
Russ Cox
61e362add9 mac: arrange for arm64 run on arm64
Makes 9term.app work again (not put you in an x86_64 jail).
2024-10-22 08:11:37 -04:00
Ethan Burns
851c3799ad Link the snarf buffer to the compositor's copy/paste buffer on Wayland. 2024-08-31 15:47:15 -04:00
Ethan Burns
5f20010eb6 Add wayland support to devdraw. 2024-08-21 19:47:19 -04:00
Russ Cox
a2567fcac9 devdraw: handle shift of real mouse buttons correctly 2024-06-17 09:28:40 -04:00
Russ Cox
e9cbe46fe6 lib9: skip buggy S_ISCHR check in disksize on OpenBSD
The portable code is already checking S_ISCHR anyway.
2024-06-15 22:15:06 -04:00
Russ Cox
e243a4c391 man: update indexes 2024-06-15 22:10:59 -04:00
Russ Cox
211de84701 acme: remove debug print 2024-06-15 22:10:55 -04:00
Russ Cox
0c79c32675 acme: shift button 3 for reverse search
An experiment. Let's see if it's any good.
Also document the Mac conventions in devdraw(3).
2024-06-15 10:57:45 -04:00
Russ Cox
60ca2be037 all: quiet macOS build again 2024-06-15 10:57:45 -04:00
Kevin Hovsäter
8eb063cffd Remove redundant echo 2024-05-31 05:36:50 -04:00
Russ Cox
ace7bcb75b INSTALL: fix $PLAN9 in message 2024-04-06 11:14:36 -04:00
Russ Cox
b1b88c75fd tpic: clean up 2024-04-06 11:13:59 -04:00
Russ Cox
d5b2552b95 acme: clean up environment after exec
Make up for the lack of a real rfork(RFENVG).
2024-04-06 11:13:24 -04:00
Sevan Janiyan
be7c68f695 .github/workflows/actions.yaml: Run CI on pull requests too
Not just on pushes
2024-01-09 19:00:21 -05:00
Sevan Janiyan
b5e415d97d .travis.yml: Delete
Service is no longer around.
2024-01-09 19:00:21 -05:00
Sevan Janiyan
f3201246d7 README.md: Add GH actions badge 2024-01-09 19:00:21 -05:00
Sevan Janiyan
e0dd1865ff .github/workflows/actions.yaml: Add
Basic configuration which builds p9p on latest Ubuntu & macOS.
Skipped on adding more operating systems as build would hold up
waiting for runners, whereas with -latest targets, build starts
immediately.
Supported runners can be found on
https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job
2024-01-09 19:00:21 -05:00
fgergo
897625ff9b mntgen: import mntgen(4) from Plan 9
new file:   man/man4/mntgen.4
new file:   src/cmd/mntgen.c
2024-01-09 15:25:19 -05:00
fgergo
f8681acb37
ramfs: update to work
ramfs: update to work

erealloc(p, 0) is handled correctly
removed fprint(2, ...
removed assert()
2023-12-30 08:58:44 -05:00
Igor Burago
3a877764da 9l: silence the 'ignoring duplicate libraries' warning on macOS 2023-12-18 10:10:55 -05:00
Igor Burago
0bc1ff0fa0 9l: refactor the warning-silencing mechanics to match that of 9c 2023-12-18 10:10:55 -05:00
Russ Cox
984c2824e3 page: fix viewing of graphics
940f1fd6af broke page on non-PDF files.
2023-09-13 10:48:18 -04:00
matheuristic
dfbafb68e2 acme: have Dump save both low and high DPI fontnames
Instead of only saving a window's currently displayed font's name to the
dump file, have Acme's Dump command save that window's combined low DPI
and high DPI font names when both are available.

See 9fans/plan9port#630
2023-09-05 12:55:40 -04:00
japanoise
65c090346a libframe: Match the color of tick
Previously the vertical bar in tick was always black; fine if you
use the standard black-on-white for everything, but any attempt to
add a dark mode ran into trouble with the tick being half hard-coded
black, half the new text color.
2023-08-23 14:47:08 -04:00
matheuristic
a36e66f0d2 libdraw: fix subfont scaling
A subfont with n chars has n+1 Fontchars, so scalesubfont() needs to
scale all n+1 info entries.
2023-08-21 11:38:17 -04:00
Igor Burago
cc4571fec6 libregexp: allow up to 127 captured subexpressions in one regexp
128 counting with the entire expression match ($0).
2023-03-31 11:50:53 -04:00
Igor Burago
727ce0e123 plumber: increase NMATCHSUBEXP up to 100
Thus up to two-digit subexpression match variables are supported
($1 through $99) in addition to the entire expression match ($0).
2023-03-31 08:17:47 -04:00
Igor Burago
4cd06ff66c libregexp: allow up to 128 character classes in one regexp 2023-03-31 08:16:11 -04:00
Sevan Janiyan
6eaa52d3f7 README.md: Drop travis-ci badge
Service is dead.
2023-03-30 15:04:28 -04:00
Igor Burago
a4d35dc3fd plumber: use strtoul to parse subexpression match variable substitutions 2023-03-30 10:44:30 -04:00
Igor Burago
0790296f73 plumber: increase NMATCHSUBEXP up to libregexp's NSUBEXP 2023-03-30 10:44:30 -04:00
Igor Burago
6c0efecd13 plumber: allow multi-digit subexpression match variable substitutions 2023-03-30 10:44:30 -04:00
Igor Burago
760cf86705 plumber: parametrize the number of stored match pattern subexpressions 2023-03-30 10:44:30 -04:00
zakkor
0392f49cfc devdraw: Fix mouse wheel scrolling in 1-tick increments on macOS 2023-03-29 13:13:42 -04:00
zhenya-1007
e2a141ae09 Fix a typo 2023-01-23 15:45:55 -05:00
David Arnold
4938281a82 Fix tyop 2023-01-09 17:03:29 -05:00
Russ Cox
43f5af9c8d acme: allow larger paste amounts 2023-01-06 12:04:17 -05:00
Russ Cox
940f1fd6af page: scale ppi on high-res displays
Also fix wording of -w warning.
2023-01-06 12:04:17 -05:00
Tom Schwindl
ffbdd1aa20 rio: check the return value of malloc(3) 2022-09-12 10:35:36 -04:00
MvA
846f724983 fix double free bug, simplify error handling, reduce X11 calls 2022-09-11 09:55:17 -04:00
MvA
3e764832bc fix double free bug, simplify error handling, reduce X11 calls, improve style 2022-09-11 09:55:17 -04:00
Derek Stevens
52be2761ae fix indentation 2022-09-07 12:24:01 -04:00