mirror of
https://github.com/robbert-vdh/yabridge.git
synced 2026-05-13 20:09:59 +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:
@@ -31,6 +31,7 @@
|
||||
|
||||
#include "../common/configuration.h"
|
||||
#include "utils.h"
|
||||
#include "xdnd-proxy.h"
|
||||
|
||||
/**
|
||||
* The maximum number of Win32 messages to handle per message loop. This is
|
||||
@@ -223,8 +224,17 @@ class Editor {
|
||||
*/
|
||||
void do_xembed() const;
|
||||
|
||||
/**
|
||||
* Every editor window gets its own X11 connection.
|
||||
*/
|
||||
std::shared_ptr<xcb_connection_t> x11_connection;
|
||||
|
||||
/**
|
||||
* A handle for our Wine->X11 drag-and-drop proxy. We only have one of these
|
||||
* per process, and it gets freed again when the last handle gets dropped.
|
||||
*/
|
||||
WineXdndProxy::Handle dnd_proxy_handle;
|
||||
|
||||
/**
|
||||
* The Wine window's client area, or the maximum size of that window. This
|
||||
* will be set to a size that's large enough to be able to enter full screen
|
||||
|
||||
Reference in New Issue
Block a user