xcbOrg/Window: Destroy connections when no longer in use
This commit is contained in:
@@ -31,12 +31,12 @@ class AttachedWindow
|
||||
{
|
||||
public:
|
||||
AttachedWindow(const smo::device::SenseDeviceSpec& spec);
|
||||
~AttachedWindow() = default;
|
||||
~AttachedWindow();
|
||||
|
||||
const smo::device::SenseDeviceSpec& getDeviceSpec() const { return deviceSpec; }
|
||||
const WindowSelector& getWindowSelector() const { return windowSelector; }
|
||||
const std::string& getActualWindowName() const { return actualWindowName; }
|
||||
void* getXcbConnection() const { return xcbConnection; }
|
||||
void* getXcbConnection() const { return xcbConnectionShared.get(); }
|
||||
std::string stringify() const;
|
||||
|
||||
private:
|
||||
@@ -47,7 +47,7 @@ private:
|
||||
smo::device::SenseDeviceSpec deviceSpec;
|
||||
WindowSelector windowSelector;
|
||||
std::string actualWindowName;
|
||||
void* xcbConnection; // Raw pointer to XCB connection from libxcbXorg
|
||||
std::shared_ptr<xcb_xorg::XcbConnection> xcbConnectionShared;
|
||||
};
|
||||
|
||||
} // namespace xcb_window
|
||||
|
||||
Reference in New Issue
Block a user