Update comments in Editor implementation

This commit is contained in:
Robbert van der Helm
2020-12-25 22:53:33 +01:00
parent 6b4df4d274
commit 448158df8f
2 changed files with 9 additions and 11 deletions
+8 -10
View File
@@ -19,8 +19,8 @@
#include <iostream> #include <iostream>
/** /**
* The most significant bit in an event's response type is used to indicate * The most significant bit in an X11 event's response type is used to indicate
* whether the event source. * the event source.
*/ */
constexpr uint16_t event_type_mask = ((1 << 7) - 1); constexpr uint16_t event_type_mask = ((1 << 7) - 1);
@@ -186,9 +186,9 @@ Editor::Editor(const Configuration& config,
if (use_xembed) { if (use_xembed) {
// This call alone doesn't do anything. We need to call this function a // This call alone doesn't do anything. We need to call this function a
// second time on visibility change, because Wine's XEmbed // second time on visibility change because Wine's XEmbed implementation
// implementation does not work properly (which is why we remvoed XEmbed // does not work properly (which is why we remvoed XEmbed support in the
// support in the first place). // first place).
do_xembed(); do_xembed();
} else { } else {
// Embed the Win32 window into the window provided by the host. Instead // Embed the Win32 window into the window provided by the host. Instead
@@ -256,7 +256,8 @@ Editor::~Editor() {
} }
HWND Editor::get_win32_handle() const { HWND Editor::get_win32_handle() const {
if (win32_child_handle) { // FIXME: The double embed and XEmbed options don't work together right now
if (win32_child_handle && !use_xembed) {
return win32_child_handle->get(); return win32_child_handle->get();
} else { } else {
return win32_handle.get(); return win32_handle.get();
@@ -264,9 +265,6 @@ HWND Editor::get_win32_handle() const {
} }
void Editor::handle_x11_events() const { void Editor::handle_x11_events() const {
// TODO: Initiating drag-and-drop in Serum _sometimes_ causes the GUI to
// update while dragging while other times it does not. From all the
// plugins I've tested this only happens in Serum though.
xcb_generic_event_t* generic_event; xcb_generic_event_t* generic_event;
while ((generic_event = xcb_poll_for_event(x11_connection.get())) != while ((generic_event = xcb_poll_for_event(x11_connection.get())) !=
nullptr) { nullptr) {
@@ -350,7 +348,7 @@ void Editor::fix_local_coordinates() const {
return; return;
} }
// We're purposely not using XEmbed. This has the consequence that wine // We're purposely not using XEmbed here. This has the consequence that wine
// still thinks that any X and Y coordinates are relative to the x11 window // still thinks that any X and Y coordinates are relative to the x11 window
// root instead of the parent window provided by the DAW, causing all sorts // root instead of the parent window provided by the DAW, causing all sorts
// of GUI interactions to break. To alleviate this we'll just lie to Wine // of GUI interactions to break. To alleviate this we'll just lie to Wine
+1 -1
View File
@@ -86,7 +86,7 @@ class WindowClass {
* *
* This workaround was inspired by LinVst. * This workaround was inspired by LinVst.
* *
* As of yabridge 3.0 XEMbed is back as an option, but it's disabled by default * As of yabridge 3.0 XEmbed is back as an option, but it's disabled by default
* because of the issues mentioned above. * because of the issues mentioned above.
*/ */
class Editor { class Editor {