From b21e9f29bbff8829c7170efb8289733decaf65b8 Mon Sep 17 00:00:00 2001 From: Robbert van der Helm Date: Thu, 22 Jul 2021 14:25:56 +0200 Subject: [PATCH] Mention new embedding structure in architecture.md --- docs/architecture.md | 12 +++++++++--- src/wine-host/editor.h | 3 --- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/docs/architecture.md b/docs/architecture.md index bdaca1e8..8f9485de 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -84,9 +84,15 @@ editors on both the Linux and the Wine sides. Everything related to editor embedding happens in `src/wine-host/editor.h`. To embed the Windows plugin's editor in the X11 window provided by the host we'll -create a Wine window, embed that window into the host's window, and then ask the -Windows plugin to embed itself into that Wine window. For embedding the Wine -window into the host's window we support two different implementations: +create a Wine window and an X11 wrapper window, embed that Wine window into the +wrapper window, embed the wrapper window into the host's window, and then ask +the Windows plugin to embed itself into that Wine window. The reason why we need +a separate wrapper window in between is to prevent the host from incorrectly +subscribing to `SubStructureNotify` events and catching the `ConfigureNotify` +events we're going to send to the Wine window. We will manually resize the +wrapper window whenever the host asks the plugin to resize itself to a certain +size or when the plugin resizes its own window. For embedding the Wine window +into the host's window we support two different implementations: - The main approach involves reparenting the Wine window to the host window, and then manually sending X11 `ConfigureNotify` events to the corresponding X11 diff --git a/src/wine-host/editor.h b/src/wine-host/editor.h index 58abd01a..39c88cfb 100644 --- a/src/wine-host/editor.h +++ b/src/wine-host/editor.h @@ -155,9 +155,6 @@ class DeferredWin32Window { * window we created using `CreateWindowEx()`. We will need to manually resize * `wrapper_window` to match size changes coming from and going to the plugin * belonging to `wine_window`. - * - * TODO: Check if we can remove the double embed option after implementing this - * TODO: Update architecture document */ class Editor { public: