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`. |
||
|---|---|---|
| .github/workflows | ||
| acid | ||
| bin | ||
| dict | ||
| dist | ||
| face | ||
| font | ||
| include | ||
| lib | ||
| lp | ||
| mac | ||
| man | ||
| ndb | ||
| news | ||
| plumb | ||
| postscript | ||
| proto | ||
| sky | ||
| src | ||
| tmac | ||
| troff | ||
| unix | ||
| .gitignore | ||
| CHANGES | ||
| configure | ||
| CONTRIBUTING.md | ||
| CONTRIBUTORS | ||
| INSTALL | ||
| install.txt | ||
| LICENSE | ||
| Makefile | ||
| rcmain | ||
| README.md | ||
This is a port of many Plan 9 libraries and programs to Unix.
Installation
To install, run ./INSTALL. It builds mk and then uses mk to run the rest of the installation.
For more details, see install(1), at install.txt in this directory and at https://9fans.github.io/plan9port/man/man1/install.html.
Documentation
See https://9fans.github.io/plan9port/man/ for more documentation. (Documentation is also in this tree, but you need to run a successful install first. After that, "9 man 1 intro".)
Intro(1) contains a list of man pages that describe new features or differences from Plan 9.
Helping out
If you'd like to help out, great!
If you port this code to other architectures, please share your changes so others can benefit.
Git
You can use Git to keep your local copy up-to-date as we make changes and fix bugs. See the git(1) man page here ("9 man git") for details on using Git.
Status
Contact
-
Mailing list: https://groups.google.com/group/plan9port-dev
-
Issue tracker: https://github.com/9fans/plan9port/issues
-
Submitting changes: https://github.com/9fans/plan9port/pulls
-
Russ Cox rsc@swtch.com