Commit Graph

2112 Commits

Author SHA1 Message Date
Robbert van der Helm 7d8a252301 Implement the function for sending XDND messages 2021-07-10 23:18:18 +02:00
Robbert van der Helm 2e153304dd Find the first XDND aware window under the cursor 2021-07-10 23:08:37 +02:00
Robbert van der Helm 82f7a8f799 Check property type instead of format
All of these fields should be zero, but this sounds like the better way
to test this.
2021-07-10 22:24:06 +02:00
Robbert van der Helm 916b1ed6c0 Track the last window we hovered over, if valid 2021-07-10 20:26:45 +02:00
Robbert van der Helm 92daa33adf Ignore Wine windows in the drag-and-drop handling
Wine will be able to handle this better than we can, and we of course
don't want any conflicts here.
2021-07-10 19:57:09 +02:00
Robbert van der Helm 998e222651 Fix definition clashes in unity build 2021-07-10 19:38:24 +02:00
Robbert van der Helm 091ab0f0df Spawn a thread to fake do our XDND polling
We cannot integrate this into our event loop like we planned, because
Wine a) grabs the mouse pointer so we cannot do that, and b) blocks the
GUI thread. So instead we will spawn our own thread and do polling based
XDND. When Wine's tracker window gets destroyed, we know that the left
mouse button has been released.
2021-07-10 19:28:40 +02:00
Robbert van der Helm 42ce69943a Fix typo in X11 error message 2021-07-10 18:22:54 +02:00
Robbert van der Helm f044dc4784 Fetch basic atoms for XDND 2021-07-10 17:48:22 +02:00
Robbert van der Helm ddac793e82 Add a function for fetching X11 atoms by name 2021-07-10 17:22:04 +02:00
Robbert van der Helm 3372f4424e Create a window for the X11 proxy 2021-07-10 16:43:23 +02:00
Robbert van der Helm a8b7dc8764 Move the dnd proxy WinEvent callback around 2021-07-10 16:19:52 +02:00
Robbert van der Helm d908db5476 Add an X11 event handling function to the proxy 2021-07-10 16:19:23 +02:00
Robbert van der Helm b47a6e034b Rename init_proxy -> get_handle 2021-07-10 15:16:20 +02:00
Robbert van der Helm 1946693244 Expand on the new mutual recursion changelog entry 2021-07-10 14:40:06 +02:00
Robbert van der Helm 3c94ee7049 Only perform mutual recursion from the GUI thread
JUCE incorrectly calls `IComponentHandler::performEdit()` from the audio
thread instead of using the output parameter changes queue, so this
would also cause GUI resizes to be handled from the audio thread if they
come in at the same time as such a parameter change.
2021-07-10 14:30:52 +02:00
Robbert van der Helm 04a8be6cc6 Keep track of which thread the GUI thread is 2021-07-10 14:21:50 +02:00
Robbert van der Helm df75427f69 Store the dragged files so we can use them in XDND 2021-07-10 13:06:46 +02:00
Robbert van der Helm c0871e3b5d Unify drag-and-drop debug messages 2021-07-10 12:44:14 +02:00
Robbert van der Helm b951260795 Update the tested DAW versions 2021-07-10 12:39:41 +02:00
Robbert van der Helm bc9d4d02a2 Fix copy and move semantics for DnD proxy handle 2021-07-10 02:17:10 +02:00
Robbert van der Helm dbb1b09256 Add proper copy and move semantics to proxy handle 2021-07-10 00:49:11 +02:00
Robbert van der Helm 2ba2cf1ab7 Free the drag-and-drop proxy after closing editors
Apparently X11 connections are a scarce resource, so it seems like a
good idea to not hang on to them for too long. Now this is sort of a
hybrid between COM-style memory management and a singleton.
2021-07-10 00:15:38 +02:00
Robbert van der Helm b1e3488a24 Add an X11 connection to the drag-and-drop proxy 2021-07-10 00:09:29 +02:00
Robbert van der Helm b3001cc22b Add missing #pragma once
Oops.
2021-07-09 21:47:01 +02:00
Robbert van der Helm 41160adc33 Fix the drag-and-drop debugging message
Because why not?
2021-07-09 21:37:29 +02:00
Robbert van der Helm dd14a90f9a Only handle drag-and-drop from this process
When called from another process the data pointer will of course be
invalid, so every process must handle their own drag-and-drop.
2021-07-09 21:32:56 +02:00
Robbert van der Helm f33c02f4f7 Add a proof of concept drag-and-drop snooper
This doesn't do anything useful yet, but it will print the names of
files that are being dragged and dropped on the Wine server (using the
OLE API) while the plugin is open.
2021-07-09 20:53:15 +02:00
Robbert van der Helm fc61658ada Add the start for a Wine->X11 DnD wrapper 2021-07-09 18:48:11 +02:00
Robbert van der Helm f1a8ed1668 Update the tested REAPER version 2021-07-08 19:35:27 +02:00
Robbert van der Helm b72b6f8273 Change const static to static const
To match the order used everywhere else.
2021-07-08 18:18:29 +02:00
Robbert van der Helm a58a1ab111 Update parameter name in header
Apparently this wasn't saved yet when I commited
a06d0bc515.
2021-07-05 18:29:04 +02:00
Robbert van der Helm bf84057044 [yabridgectl] Normalize symlinks for plugin counts
Now this should actually be correct with partially overlapping plugin
directories when symlinks were used.
2021-07-05 17:56:22 +02:00
Robbert van der Helm a06d0bc515 Actually update the supported interface status
With this Waves VST3 plugins now work. But was it worth it?
2021-07-05 16:48:24 +02:00
Robbert van der Helm 4e4bbe1ba4 Replace const-rvalue with rvalue
Since const-rvalue doesn't make any sense.
2021-07-05 16:39:11 +02:00
Robbert van der Helm 1397400155 Reload supported interfaces after IPluginBase::initialize()
This is needed as a workaround to support Waves VST3 plugins.

Right now does does not actually fix the issue because the arguments are
not updated in the subclasses. The next commit will fix this.
2021-07-05 16:08:01 +02:00
Robbert van der Helm 3fbb01f225 Move all casted VST3 plugin interfaces to struct
To make Waves plugins happy we're going to have to replace this after
calling `IPluginBase::initialize()`.
2021-07-05 15:22:47 +02:00
Robbert van der Helm aaed5f0128 Reword changelog 2021-07-05 15:03:55 +02:00
Robbert van der Helm 97ff407ef6 Allow plug view creation to fail 2021-07-05 15:02:36 +02:00
Robbert van der Helm 4c24baa3d2 Remove default constructor for Vst3PluginInstance
Seems weird to need this specifically so we can use the map overload
that creates a new instance when the key doesn't exist in the map. This
seems safer.
2021-07-05 14:35:44 +02:00
Robbert van der Helm e25231c2d2 Rename VST3 instance holder classes
We're going to have to split up the interfaces into another object so we
can reinitialize it later.
2021-07-05 14:16:23 +02:00
Robbert van der Helm cd060fba24 Remove comment about host context interfaces
As it turns out, later SDK versions did add more interface. (this class
used to directly implement `IHostApplication`)
2021-07-05 01:17:34 +02:00
Robbert van der Helm 56a2ec854c Remove recommendation to use Wine Staging 6.4
Wine Staging (or rather, wine-tkg) 6.12 seems stable so far. As long as
you don't enable fshack, apparently.
2021-07-04 18:54:28 +02:00
Robbert van der Helm ef8e1cc1d5 Update tested DAWs table
We should probably get rid of the Ardour/Mixbus warning, since this is
also how native plugins would function in the Windows version of Ardour.
The warnings were here from when yabridge didn't properly serialize the
bus type, since Ardour specifically only supports a single main input
and output and optionally an auxiliary input.
2021-07-04 00:41:09 +02:00
Robbert van der Helm f47d882072 Reword recommendation to stick with Wine 6.4 2021-07-04 00:30:43 +02:00
Robbert van der Helm c13d8f2ee3 [yabridgectl] Recursively prune empty directories
If pruning results in a directory becoming empty, then we should remove
that directory. This approach won't touch any directories that we aren't
pruning from.
2021-07-03 18:35:51 +02:00
Robbert van der Helm 70c40970aa [yabridgectl] Make syncing much more resiliant
This commit does a couple of things since the refactoring made it
difficult to split these things up:

- The counts for managed and new plugins are now always correct, even
  when plugin directory A contains a symlink to plugin directory B.
- Orphan files will now be pruned from managed VST3 directories, making
  switching between different architectures easier. (the previous
  approach involved nuking the entire bundle, which of course has a
  bunch of downsides)
2021-07-03 18:20:05 +02:00
Robbert van der Helm 0f3730fd97 Reduce the notification expiration time 2021-07-03 17:07:44 +02:00
Robbert van der Helm 85c84aba0f [yabridgectl] Partially revert 5ea04c4
We should be a bit more clever about this. This approach would mean that
the plugin would be rescanned every time, since the whole 'don't
reinstall plugins if that wouldn't change anything' thing no longer
works with this approach.
2021-07-03 16:38:56 +02:00
Robbert van der Helm e0b06c84ce Avoid manual memory management in the editor
Letting `std::unique_ptr<T>` do the thinking for us makes a lot more
sense. We only need manual memory management for the error because we
need to pass a pointer to that pointer to xcb, but at least we have the
macro there so it still stays nice and readable.
2021-07-01 19:51:45 +02:00