Rename DeferredWindow to DeferredWin32Window

This commit is contained in:
Robbert van der Helm
2021-07-21 14:26:34 +02:00
parent 68d4a6610e
commit a38e7c3588
2 changed files with 12 additions and 11 deletions
+5 -4
View File
@@ -177,14 +177,15 @@ xcb_window_t get_x11_handle(HWND win32_handle) noexcept;
*/
ATOM get_window_class() noexcept;
DeferredWindow::DeferredWindow(MainContext& main_context,
std::shared_ptr<xcb_connection_t> x11_connection,
HWND window) noexcept
DeferredWin32Window::DeferredWin32Window(
MainContext& main_context,
std::shared_ptr<xcb_connection_t> x11_connection,
HWND window) noexcept
: handle(window),
main_context(main_context),
x11_connection(x11_connection) {}
DeferredWindow::~DeferredWindow() noexcept {
DeferredWin32Window::~DeferredWin32Window() noexcept {
// NOTE: For some rason, Wine will sometimes try to delete a window twice if
// the parent window no longer exists. I've only seen this cause
// issues with plugins that hang when their window is hidden, like the
+7 -7
View File
@@ -88,7 +88,7 @@ struct Size {
* This is essentially an alternative around `std::unique_ptr` with a non-static
* custom deleter.
*/
class DeferredWindow {
class DeferredWin32Window {
public:
/**
* Manage a window so that it will be asynchronously closed when this object
@@ -100,15 +100,15 @@ class DeferredWindow {
* editor.
* @param window A `HWND` obtained through a call to `CreateWindowEx`
*/
DeferredWindow(MainContext& main_context,
std::shared_ptr<xcb_connection_t> x11_connection,
HWND window) noexcept;
DeferredWin32Window(MainContext& main_context,
std::shared_ptr<xcb_connection_t> x11_connection,
HWND window) noexcept;
/**
* Post a `WM_CLOSE` message to the `handle`'s message queue as described
* above.
*/
~DeferredWindow() noexcept;
~DeferredWin32Window() noexcept;
const HWND handle;
@@ -292,7 +292,7 @@ class Editor {
* The handle for the window created through Wine that the plugin uses to
* embed itself in.
*/
DeferredWindow win32_window;
DeferredWin32Window win32_window;
/**
* A child window embedded inside of `win32_window`. This is only used if
@@ -302,7 +302,7 @@ class Editor {
* of the readme for more details). The plugin should then embed itself
* within this child window.
*/
std::optional<DeferredWindow> win32_child_window;
std::optional<DeferredWin32Window> win32_child_window;
/**
* A timer we'll use to periodically run `idle_timer_proc`, if set. Thisi is