diff --git a/workspace.cpp b/workspace.cpp index 2ebf21d04a..8840591699 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -351,7 +351,7 @@ void Workspace::init() createUnmanaged(wins[i]); } else if (attr->map_state != XCB_MAP_STATE_UNMAPPED) { if (Application::wasCrash()) { - fixPositionAfterCrash(wins[i], windowGeometries[i].data()); + fixPositionAfterCrash(wins[i], windowGeometries.at(i).data()); } // ### This will request the attributes again diff --git a/xcbutils.h b/xcbutils.h index 5359fd1166..baa507fc51 100644 --- a/xcbutils.h +++ b/xcbutils.h @@ -102,13 +102,24 @@ public: getReply(); return m_reply == NULL; } + inline bool isNull() const { + const_cast(this)->getReply(); + return m_reply == NULL; + } inline operator bool() { return !isNull(); } + inline operator bool() const { + return !isNull(); + } inline const Reply *data() { getReply(); return m_reply; } + inline const Reply *data() const { + const_cast(this)->getReply(); + return m_reply; + } inline WindowId window() const { return m_window; }