We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 70e7af6 commit f5b0c6dCopy full SHA for f5b0c6d
1 file changed
src/x11/xcb_connection.rs
@@ -40,7 +40,7 @@ impl XcbConnection {
40
let xcb_connection = unsafe { xlib_xcb::XGetXCBConnection(dpy) };
41
assert!(!xcb_connection.is_null());
42
let screen = unsafe { xlib::XDefaultScreen(dpy) } as usize;
43
- let conn = unsafe { XCBConnection::from_raw_xcb_connection(xcb_connection, true)? };
+ let conn = unsafe { XCBConnection::from_raw_xcb_connection(xcb_connection, false)? };
44
unsafe {
45
xlib_xcb::XSetEventQueueOwner(dpy, xlib_xcb::XEventQueueOwner::XCBOwnsEventQueue)
46
};
@@ -119,3 +119,11 @@ impl XcbConnection {
119
&self.conn.setup().roots[self.screen]
120
}
121
122
+
123
+impl Drop for XcbConnection {
124
+ fn drop(&mut self) {
125
+ unsafe {
126
+ xlib::XCloseDisplay(self.dpy);
127
+ }
128
129
+}
0 commit comments