mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-10 04:30:12 +02:00
Rearrange editor functions
This commit is contained in:
@@ -358,15 +358,6 @@ Editor::Editor(MainContext& main_context,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND Editor::get_win32_handle() const noexcept {
|
|
||||||
// FIXME: The double embed and XEmbed options don't work together right now
|
|
||||||
if (win32_child_window && !use_xembed) {
|
|
||||||
return win32_child_window->handle;
|
|
||||||
} else {
|
|
||||||
return win32_window.handle;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void Editor::handle_x11_events() const noexcept {
|
void Editor::handle_x11_events() const noexcept {
|
||||||
// NOTE: Ardour will unmap the window instead of closing the editor. When
|
// NOTE: Ardour will unmap the window instead of closing the editor. When
|
||||||
// the window is unmapped `wine_window` doesn't exist and any X11
|
// the window is unmapped `wine_window` doesn't exist and any X11
|
||||||
@@ -460,6 +451,15 @@ void Editor::handle_x11_events() const noexcept {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HWND Editor::get_win32_handle() const noexcept {
|
||||||
|
// FIXME: The double embed and XEmbed options don't work together right now
|
||||||
|
if (win32_child_window && !use_xembed) {
|
||||||
|
return win32_child_window->handle;
|
||||||
|
} else {
|
||||||
|
return win32_window.handle;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void Editor::fix_local_coordinates() const {
|
void Editor::fix_local_coordinates() const {
|
||||||
if (use_xembed) {
|
if (use_xembed) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -140,6 +140,11 @@ class Editor {
|
|||||||
const size_t parent_window_handle,
|
const size_t parent_window_handle,
|
||||||
std::optional<fu2::unique_function<void()>> timer_proc = std::nullopt);
|
std::optional<fu2::unique_function<void()>> timer_proc = std::nullopt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handle X11 events sent to the window our editor is embedded in.
|
||||||
|
*/
|
||||||
|
void handle_x11_events() const noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the Win32 window handle so it can be passed to an `effEditOpen()`
|
* Get the Win32 window handle so it can be passed to an `effEditOpen()`
|
||||||
* call. This will return the child window's handle if double editor
|
* call. This will return the child window's handle if double editor
|
||||||
@@ -158,11 +163,6 @@ class Editor {
|
|||||||
*/
|
*/
|
||||||
bool supports_ewmh_active_window() const;
|
bool supports_ewmh_active_window() const;
|
||||||
|
|
||||||
/**
|
|
||||||
* Handle X11 events sent to the window our editor is embedded in.
|
|
||||||
*/
|
|
||||||
void handle_x11_events() const noexcept;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lie to the Wine window about its coordinates on the screen for
|
* Lie to the Wine window about its coordinates on the screen for
|
||||||
* reparenting without using XEmbed. See the comment at the top of the
|
* reparenting without using XEmbed. See the comment at the top of the
|
||||||
|
|||||||
Reference in New Issue
Block a user