Commit Graph

708 Commits

Author SHA1 Message Date
Robbert van der Helm 4b53342514 💥 Encapsulate and rework all socket logic
This is a pretty huge change that will be important for being able to
handle nested or mutually recursive `dispatch()` and `audioMaster()`
calls. This sadly all had to be done in a single commit, so here's a
summary:

- `src/common/sockets.h:Sockets` contains all sockets on both the plugin
  and the Wine host side, and is used to both listen on and connect to
  the sockets.
- Sockets and other temporary files respect `$XDG_RUNTIME_DIR` instead
  of being dumped in `/tmp`.
- All sockets now have a unique endpoint in
  `/run/user/<uid>/yabridge-<plugin_name>-<random_id>/`. This is
  important for when we want to have multiple socket connections for
  handling `dispatch()` and `audioMaster()`.
- Because of the above, we no longer clean up the socket endpoint files
  after the connection gets established during initialization. Instead
  we'll remove the socket base directory when shutting down.
2020-10-25 21:24:56 +01:00
Robbert van der Helm 4b4b19bbd8 Mention multiple socket endpoints in architecture 2020-10-25 21:21:00 +01:00
Robbert van der Helm a1e7142f17 Mark max_win32_messages as [[maybe_unused]]
ccls/clangd doesn't know that it's being used elsewhere.
2020-10-25 13:00:50 +01:00
Robbert van der Helm ae6a557482 Mention Tk-Glitch's Wine PKGBUILD now esync's back
Esync got rebased a week ago, so esync and the fsync patches will work
again with recent versions of Wine Staging.
2020-10-24 13:25:26 +02:00
Robbert van der Helm 532bfb4e5e Change wording in changelog 2020-10-23 15:56:44 +02:00
Robbert van der Helm cbc55aa16f Bump to version 1.7.1 1.7.1 2020-10-23 14:10:11 +02:00
Robbert van der Helm 9e7888a78e Reword part of changelog 2020-10-23 14:09:49 +02:00
Robbert van der Helm c2ec1ce994 [yabridgectl] Fix removing non-existent directory
As mentioned in #46.
2020-10-23 01:49:46 +02:00
Robbert van der Helm db02fa1c43 Fix issue with closing sockets in plugin groups
As per Boost.Asio's manual, an explicit `socket.shutdown()` is needed
before calling `close()`. For some reason this worked fine in almost
every situation, but when hosting both a plugin hosted within a group
host process and a normal individually hosted plugin within a single
process, and then removing those two plugins in order, the
`host_vst_dispatch` socket of the first plugin never got closed. This
would hang the entire shutdown sequence to hang on the
`dispatch_handler` jthread.

First discovered in #45
2020-10-22 14:05:59 +02:00
Robbert van der Helm ce385f39d3 Use vfork() for spawning processes #45 2020-10-21 22:30:50 +02:00
Robbert van der Helm 3facdf532a Fix fake dropdown menus in TDR plugins
These would close immediately when hovering over them with the new focus
grabbing method.
2020-10-19 14:34:52 +02:00
Robbert van der Helm e6af947fe1 [yabridgectl] Only recreate files when necessary
As suggested in #42. This also adds a `--force` flag to reenable the old
behaviour and always recreate files even when not necessary.
2020-10-17 18:21:53 +02:00
Robbert van der Helm 8dc95f939e [yabridgectl] Move file hashing to a function 2020-10-17 17:09:03 +02:00
Robbert van der Helm 150845a301 Fix editor_double_embed causing X11 errors
Since the error codes were not before version 1.7.0 we just didn't
notice this, even though everything still appeared to work fine.
2020-10-14 16:36:48 +02:00
Robbert van der Helm 21c1f53b40 Update version in changelog 1.7.0 2020-10-13 15:41:24 +02:00
Robbert van der Helm 2b077c1a4e Bump to version 1.7.0 2020-10-13 15:38:22 +02:00
Robbert van der Helm 0602a6e3d4 Reword parts of the changelog 2020-10-13 15:38:10 +02:00
Robbert van der Helm a1162c2256 Print invalid and unknown options on startup 2020-10-13 15:04:33 +02:00
Robbert van der Helm a125f7a535 Rewrite documentation on yabridge.toml files 2020-10-13 15:04:33 +02:00
Robbert van der Helm bd84d87b9d Clarify that path setup is not always necessary 2020-10-13 15:04:33 +02:00
Robbert van der Helm a87f399266 Add PayPal and Liberapay links
But definitely don't feel obliged to donate! Just spreading awareness
about yabridge is more important to me.
2020-10-12 15:44:17 +02:00
Robbert van der Helm 95ad6fc36a Work around reparenting issues in #40
I'm still really curious why this double reparent would be needed
though. Everything works fine on any other i3 config I've tried, and
even the exact same config in a VM works fine for me.
2020-10-12 14:28:29 +02:00
Robbert van der Helm f409dbec59 Add some more details to the input focus chagnelog 2020-10-11 22:15:04 +02:00
Robbert van der Helm 225d6a000e Add a fallback for non-EWMH compliant WMs
I'm not sure how many people use WMs that don't implement
`_NET_ACTIVE_WINDOW`, but at least this will give those people some way
to grab input focus, even if it's not as good as the new method.
2020-10-09 14:35:43 +02:00
Robbert van der Helm 5a64769699 Update GitHub Actions workflow to use env files
set-env has been deprecated
https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
2020-10-09 12:56:55 +02:00
Robbert van der Helm 6ff61b1904 Rewrite how input focus grabbing works #38 2020-10-08 19:34:26 +02:00
Robbert van der Helm 36d39bfca9 Add missing free() calls for xcb 2020-10-08 17:03:03 +02:00
Robbert van der Helm 60c4e64b9b Add xcb error assertions instead of segfaulting
These things should not fail (and I've never seen one of these thing
error out with yabridge), but in the case they do an assertion is at
least a lot trace down than a segfault.
2020-10-08 16:17:00 +02:00
Robbert van der Helm e680f2eddd Made the input focus grabbing even more aggressive
This fixes keyboard focus not returning when closing dialogs in Melda
plugins. I'll have to do some more testing to see if this does not
introduce any unwanted side effects.
2020-10-08 15:51:20 +02:00
Robbert van der Helm e7cbd9e21e Slightly clean up the libSwell message 2020-10-08 14:37:29 +02:00
Robbert van der Helm dd1081631d Mention that the keyboard fix also affects Ardour 2020-10-08 14:33:21 +02:00
Robbert van der Helm bfd4553d84 Change punctuation in new libSwell message 2020-10-01 14:23:39 +02:00
Robbert van der Helm 8ae9c4d263 Made input focus grabbing more aggressive #38
This fixes keyboard input in REAPER, and I haven't found any downsides
to this approach yet.
2020-09-30 17:30:38 +02:00
Robbert van der Helm d4787fc120 Clarify libSwell message and mention workaround 2020-09-29 18:13:39 +02:00
Robbert van der Helm 59c9a2308a Bump to version 1.6.1 1.6.1 2020-09-28 22:41:01 +02:00
Robbert van der Helm 2073906257 Reword part of the changelog 2020-09-28 22:40:00 +02:00
Robbert van der Helm 32b3e106b1 Fixed potential use-after-free on detached threads
This could sometimes cause REAPER's plugin scanning to crash when the
stars aligned in the wrong way since the stop token would no longer
exist.
2020-09-28 22:31:53 +02:00
Robbert van der Helm 401824ae54 Mention the Xorg client limit in troubleshooting 2020-09-27 23:01:28 +02:00
Robbert van der Helm 7fbbb48c54 Fix parsing order of yabridge.toml #37
Since tomlplusplus uses `std::map` instead of `std::unordered_map`
internally the tables were actually being read in lexicographical order.
2020-09-27 19:42:07 +02:00
Robbert van der Helm f1b1f20fdb Update tomlplusplus 2020-09-27 17:48:43 +02:00
Robbert van der Helm ae402aa805 Fix plugin groups outside of Wine prefixes
Boost.Process's `boost::process::environment::at` throws when the
environment variable does not exist, as opposed to `operator[]` which
falls back to an empty value.
2020-09-27 17:26:16 +02:00
Robbert van der Helm 1ad9a2b4ab Add footnote on why ~/.local/share over /usr/local 2020-09-27 13:47:41 +02:00
Robbert van der Helm f67e1923cc Also search through /usr/local/lib in yabridgectl
For automatic path detection. It's still not recommended to install
yabridge there, but if you know what you're doing then this would at
least be a good default to have.
2020-09-27 13:33:53 +02:00
Robbert van der Helm 4abff276ac Make footnotes on dependency versions hyperlinks 2020-09-27 13:24:12 +02:00
Robbert van der Helm 4c89558457 Resolve relative paths in yabridgectl 2020-09-22 23:15:51 +02:00
Robbert van der Helm 086ee0c09f Fix typo in the readme 2020-09-17 20:37:42 +02:00
Robbert van der Helm 850e348bec Clarify that AUR installs don't require PATH setup 2020-09-17 20:37:42 +02:00
Robbert van der Helm 2ad78a94a4 Update yabridgectl lock file
Forgot to do this during the release.
2020-09-17 15:12:05 +02:00
Robbert van der Helm 844ef7a8c5 Bump to version 1.6.0
This has been a bit overdue, but since this only fixes a few niche
issues with Renoise and REAPER I wanted to make sure that it actually
worked.
1.6.0
2020-09-17 14:47:16 +02:00
Robbert van der Helm f40d922f91 Reword changelog 2020-09-17 14:45:43 +02:00