mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-07 20:10:13 +02:00
Free the drag-and-drop proxy after closing editors
Apparently X11 connections are a scarce resource, so it seems like a good idea to not hang on to them for too long. Now this is sort of a hybrid between COM-style memory management and a singleton.
This commit is contained in:
@@ -20,8 +20,6 @@
|
||||
|
||||
#include <boost/container/small_vector.hpp>
|
||||
|
||||
#include "xdnd-proxy.h"
|
||||
|
||||
using namespace std::literals::chrono_literals;
|
||||
|
||||
// A catchable alternative to `assert()`. Normally all of our `assert(!error)`
|
||||
@@ -204,6 +202,7 @@ Editor::Editor(MainContext& main_context,
|
||||
std::optional<fu2::unique_function<void()>> timer_proc)
|
||||
: use_xembed(config.editor_xembed),
|
||||
x11_connection(xcb_connect(nullptr, nullptr), xcb_disconnect),
|
||||
dnd_proxy_handle(WineXdndProxy::init_proxy()),
|
||||
client_area(get_maximum_screen_dimensions(*x11_connection)),
|
||||
// Create a window without any decoratiosn for easy embedding. The
|
||||
// combination of `WS_EX_TOOLWINDOW` and `WS_POPUP` causes the window to
|
||||
|
||||
Reference in New Issue
Block a user