refactor(connection): Listen for property notify by default

This commit is contained in:
Michael Carlberg
2016-12-23 01:05:36 +01:00
parent 9479b5abe2
commit d4e3891ab6
3 changed files with 13 additions and 8 deletions

View File

@ -47,7 +47,7 @@ int main(int argc, char** argv) {
XInitThreads();
// Store the xcb connection pointer with a disconnect deleter
shared_ptr<xcb_connection_t> xcbconn{xutils::get_connection(), xutils::xcb_connection_deleter{}};
unique_ptr<xcb_connection_t, xutils::xcb_connection_deleter> xcbconn{xutils::get_connection()};
if (!xcbconn) {
logger.err("A connection to X could not be established... ");
@ -57,6 +57,7 @@ int main(int argc, char** argv) {
connection& conn{connection::make(&*xcbconn)};
conn.preload_atoms();
conn.query_extensions();
conn.ensure_event_mask(conn.root(), XCB_EVENT_MASK_PROPERTY_CHANGE);
//==================================================
// Parse command line arguments