about summary refs log tree commit diff
path: root/src/x/connection.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/x/connection.rs')
-rw-r--r--src/x/connection.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/x/connection.rs b/src/x/connection.rs
index c4e879f..f37f665 100644
--- a/src/x/connection.rs
+++ b/src/x/connection.rs
@@ -7,6 +7,12 @@ use xcb::x::{ Atom, InternAtom };
 
 pub struct Connection(xcb::Connection);
 
+impl PartialEq for Connection {
+  fn eq(&self, other: &Connection) -> bool {
+    self.0.get_raw_conn() == other.0.get_raw_conn()
+  }
+}
+
 impl Connection {
   pub fn connect() -> xcb::ConnResult<(Connection, i32)> {
     let (connection, screen_index)