Commit Graph

2238 Commits

Author SHA1 Message Date
Robbert van der Helm 9e84352609 Fix typo in XDND code 2021-07-23 12:45:53 +02:00
Robbert van der Helm 75a6bed1b9 Reword changelog 2021-07-23 00:57:54 +02:00
Robbert van der Helm 8108e08dbf Keep the old time stamp and sequence number
On second thought this seems like a good idea.
2021-07-22 16:31:03 +02:00
Robbert van der Helm 3c8f3b0b41 Forward synthetic keyboard events to Wine window
This is needed for Bitwig Studio. See the comments.
2021-07-22 16:05:22 +02:00
Robbert van der Helm c4c23b9574 Unify enter/focus event tracing 2021-07-22 16:04:39 +02:00
Robbert van der Helm 9aae3665a2 Fix reparent error logging 2021-07-22 15:45:56 +02:00
Robbert van der Helm df40b85e60 Mention Wine->X11 drag-and-drop in architecture.md 2021-07-22 14:28:27 +02:00
Robbert van der Helm b21e9f29bb Mention new embedding structure in architecture.md 2021-07-22 14:25:56 +02:00
Robbert van der Helm 1e47390edc Also listen for ConfigureNotify on the wrapper
This is needed for Tracktion Waveform because they shift our wrapper
window a bit downwards. Otherwise opening the window while your mouse
cursor is already inside of it would trip up Wine's coordinates.
2021-07-21 22:54:21 +02:00
Robbert van der Helm 99304d19b8 Listen to the correct window for focus and enter
This now all got shifted one window by the introduction of the wrapper
window.
2021-07-21 22:53:04 +02:00
Robbert van der Helm 68c47064a0 Check the window in focus/enter events 2021-07-21 22:29:16 +02:00
Robbert van der Helm cb1c1858e0 Translate coordinates from the wrapper window
We moved this from `parent_window` to `wine_window` in
974951e966 to account for Waveform adding
an offset in their windows, so now that we have `wrapper_window` we
should be translating from there instead.
2021-07-21 22:18:58 +02:00
Robbert van der Helm d13f39dce5 Don't check result on IPlugView::onSize()
Melda plugins always return `kResultFalse`, so we should just assume the
resize succeeds.
2021-07-21 20:45:04 +02:00
Robbert van der Helm 0ed75b5ce4 Don't fetch the root window early
Wine is weird. The whole reason why we're doing these weird things is
because Wine somehow tries to delete the window twice. If we don't call
`xcb_query_tree()` here (and get an error back), then we're back at the
error we tried to solve. Apparently this works, and given that noone
dares touching Wine's X11drv code I won't ask any further questions.
2021-07-21 20:39:16 +02:00
Robbert van der Helm 9002468229 Fetch the Wine and root window IDs early
There's no reason to wait until the last moment to fetch these.
2021-07-21 18:06:39 +02:00
Robbert van der Helm d41c05e90e Revert "Change editor window destruction order"
This reverts commit d3d21c65f4.

On second thought, Wine actually handles things better this way. We want
to avoid both hangs and the Wine window becoming visible, and this
achieves both of those things. We should just silence the warning.
2021-07-21 18:03:03 +02:00
Robbert van der Helm e1e5a1588c Unmap wine_window before reparenting back to root 2021-07-21 17:53:27 +02:00
Robbert van der Helm d3d21c65f4 Change editor window destruction order
The wrapper window can only be removed after we reparented the Wine
window back to the root.
2021-07-21 17:50:29 +02:00
Robbert van der Helm f6fb45fee3 Mention Ardour VST3 editor resizing
Ardour ignores the `IPlugView::resizeView()` and only listens to
`ConfigureNotify` events for growing its VST3 editorsZ, so now this
works.
2021-07-21 17:16:21 +02:00
Robbert van der Helm e223c98b0d Remove XEmbed testing todo
Still seems to work 'fine' (as in, not really).
2021-07-21 17:01:02 +02:00
Robbert van der Helm e95f381fa0 Remove unnecessary unreparent check
Or at least, hopefully this is not needed.
2021-07-21 17:01:02 +02:00
Robbert van der Helm f04bc7a07b Mention the Carla VST3 regression 2021-07-21 17:01:02 +02:00
Robbert van der Helm f3bce6ee15 Mention the embedding rewrite in the changelog 2021-07-21 17:01:02 +02:00
Robbert van der Helm e28bc63f8d Also resize the wrapper window for VST3 plugins 2021-07-21 17:01:02 +02:00
Robbert van der Helm 4277561aa4 Reorder Vst3Bridge methods 2021-07-21 17:01:02 +02:00
Robbert van der Helm 418cd68a81 Resize the new wrapper window for VST2 plugins 2021-07-21 17:01:02 +02:00
Robbert van der Helm 42762d1abe 💥 Use another layer of editor embedding
We still need to make sure this window resizes properly, but this should
prevent the host from interacting with the full screen `ConfigureNotify`
events we keep sending to `wine_window`.
2021-07-21 17:01:02 +02:00
Robbert van der Helm 75ab133adb Change ProxyWindow into a more generic X11Window 2021-07-21 14:37:52 +02:00
Robbert van der Helm a38e7c3588 Rename DeferredWindow to DeferredWin32Window 2021-07-21 14:26:34 +02:00
Robbert van der Helm 68d4a6610e Don't reparent when the parent gets reparented
Some hosts, like Carla 2.3.1, will resize their windows to match the
reparented window's client area. This messes with our ConfigureNotify
setup.
2021-07-21 13:20:39 +02:00
Robbert van der Helm 1ee1229e47 Only show reparent message with editor tracing 2021-07-21 13:20:05 +02:00
Robbert van der Helm acfceaa93f Reuse the reparenting tracing in XEmbed 2021-07-20 23:13:23 +02:00
Robbert van der Helm a749faa17f Don't trace the start of every X11 event
We'll already print the event anyways.
2021-07-20 23:08:44 +02:00
Robbert van der Helm ca6fc3a453 Fix typo in log message 2021-07-20 23:06:59 +02:00
Robbert van der Helm b1fc5233d1 Add missing copyright headers 2021-07-20 17:33:26 +02:00
Robbert van der Helm ff76e482f2 Inhibit the event loop during VST3 editor init
This should in theory prevent Nimble Kick from triggering a stack
overflow when the event loop timer procs before `IPlugView::attached()`
gets called and the plugin hasn't been registered yet. I haven't seen
any other VST3 plugins trigger a race condition here.
2021-07-20 16:24:25 +02:00
Robbert van der Helm 640c188338 Fix duplicate timestamps in Wine log messages
Regression caused by the merging of these two functions in a1cb3b6.
2021-07-20 04:09:19 +02:00
Robbert van der Helm 22be79aa0d Move X11 event tracing behind +editor debug flag 2021-07-20 03:15:39 +02:00
Robbert van der Helm a1cb3b614b Add a +editor flag to YABRIDGE_DEBUG_LEVEL 2021-07-20 03:01:16 +02:00
Robbert van der Helm 9fcf91dc72 Oops. (fix inverted conditional from last commit) 2021-07-20 02:39:17 +02:00
Robbert van der Helm 138dfb3284 Fix regression in pid_running from d99f571
In some cases we would treat dead processes as not running (we could
also get EAVAIL instead of EINVAL, so it's better to just check the one
thing we should treat as a success instead).
2021-07-20 02:35:24 +02:00
Robbert van der Helm fae8314017 Merge branch 'removeme/reparenting-tracing' 2021-07-20 02:18:55 +02:00
Robbert van der Helm 6d76daff80 [yabridgectl] Print yabridge host paths in status 2021-07-20 02:02:39 +02:00
Robbert van der Helm db8eb5b678 Add a todo about the editor debug level 2021-07-20 01:31:24 +02:00
Robbert van der Helm f2ffb68b55 Attempt to fix rare multiple displays issue
(cherry picked from 1950206159fbc830718803fa152b636b2a914a95)

Under certain DEs/WMs, the window might not render at all when using
multiple displays and the primary display is set to the rightmost
display.

This seems like a reasonably candidate for fixing this.

https://github.com/robbert-vdh/yabridge/issues/89
https://github.com/robbert-vdh/yabridge/issues/104
2021-07-20 01:10:31 +02:00
Robbert van der Helm 8fbc13fc25 Steal the window back when the WM reparents it
I've seen this happen once or twice. Earlier on (in #40) we could get
away with just reparenting the window another time. But here both
reparents succeed, and the issue still happens. But a reparent notify
for `parent_window` did appear on system affected by this issue, which
is very odd. Hopefully this will help.
2021-07-20 01:10:31 +02:00
Robbert van der Helm 0f75461379 Check the windows IDs when handling X11 events
This seems like a good idea now that we're listening to more and more
events.
2021-07-20 01:00:03 +02:00
Robbert van der Helm 906ead26fd Perform some more diagnostics when reparent fails 2021-07-20 00:43:57 +02:00
Robbert van der Helm ca883da5b2 Add tracing for the various X11 events 2021-07-19 12:59:16 +02:00
Robbert van der Helm 503720a9ca In the issue template, suggest clearing log first
I get quite a few logs with a ton of cruft prepended to them, maybe this
will help.
2021-07-19 11:40:21 +02:00