From 3f69bb0e7fdb49d37928d39544504b8fb6f8f27a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Fri, 3 May 2013 11:46:18 +0200 Subject: [PATCH] Change Client's clormap to xcb_colormap_t At same time also renaming variable to follow naming scheme and have a sensible name. Also moved default value initialization into initializer list. REVIEW: 110283 --- client.cpp | 3 +-- client.h | 8 ++++---- manage.cpp | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/client.cpp b/client.cpp index 77cfb9efb0..dd5fdffaec 100644 --- a/client.cpp +++ b/client.cpp @@ -108,6 +108,7 @@ Client::Client() , autoRaiseTimer(NULL) , shadeHoverTimer(NULL) , delayedMoveResizeTimer(NULL) + , m_colormap(XCB_COLORMAP_NONE) , in_group(NULL) , m_windowGroup(XCB_WINDOW_NONE) , tab_group(NULL) @@ -190,8 +191,6 @@ Client::Client() max_mode = MaximizeRestore; - cmap = None; - //Client to workspace connections require that each //client constructed be connected to the workspace wrapper diff --git a/client.h b/client.h index 3a5771f236..40811f2e39 100644 --- a/client.h +++ b/client.h @@ -473,7 +473,7 @@ public: QRect adjustedClientArea(const QRect& desktop, const QRect& area) const; - Colormap colormap() const; + xcb_colormap_t colormap() const; /// Updates visibility depending on being shaded, virtual desktop, etc. void updateVisibility(); @@ -931,7 +931,7 @@ private: QTimer* autoRaiseTimer; QTimer* shadeHoverTimer; QTimer* delayedMoveResizeTimer; - Colormap cmap; + xcb_colormap_t m_colormap; QString cap_normal, cap_iconic, cap_suffix, cap_deco; Group* in_group; xcb_window_t m_windowGroup; @@ -1177,9 +1177,9 @@ inline bool Client::hasNETSupport() const return info->hasNETSupport(); } -inline Colormap Client::colormap() const +inline xcb_colormap_t Client::colormap() const { - return cmap; + return m_colormap; } inline void Client::invalidateLayer() diff --git a/manage.cpp b/manage.cpp index 0452ec25da..e4faec0914 100644 --- a/manage.cpp +++ b/manage.cpp @@ -102,7 +102,7 @@ bool Client::manage(xcb_window_t w, bool isMapped) info = new WinInfo(this, display(), m_client, rootWindow(), properties, 2); - cmap = attr.colormap; + m_colormap = attr.colormap; getResourceClass(); getWindowRole();