From c182d9846fbc5fa8a7a3686e7062919b214b1dfc Mon Sep 17 00:00:00 2001 From: fluxgen Date: Sun, 15 Jun 2003 18:36:16 +0000 Subject: updateWMClassName --- src/WinClient.cc | 43 +++++++++++++++---------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) diff --git a/src/WinClient.cc b/src/WinClient.cc index f44edc3..ea29bc2 100644 --- a/src/WinClient.cc +++ b/src/WinClient.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: WinClient.cc,v 1.11 2003/06/12 15:13:23 rathnor Exp $ +// $Id: WinClient.cc,v 1.12 2003/06/15 18:36:16 fluxgen Exp $ #include "WinClient.hh" @@ -176,48 +176,35 @@ bool WinClient::getWMIconName(XTextProperty &textprop) const { return XGetWMName(FbTk::App::instance()->display(), window(), &textprop); } -const std::string WinClient::getWMClassName() const { +const std::string &WinClient::getWMClassName() const { + return m_instance_name; +} + +const std::string &WinClient::getWMClassClass() const { + return m_class_name; +} + +void WinClient::updateWMClassHint() { XClassHint ch; - if (XGetClassHint(FbTk::App::instance()->display(), window(), &ch) == 0) { #ifdef DEBUG - cerr<<"Failed to read class hint!"<(ch.res_name); XFree(ch.res_name); + ch.res_name = 0; } else m_instance_name = ""; - if (ch.res_class != 0) - XFree(ch.res_class); - - return m_instance_name; - } -} - -const std::string WinClient::getWMClassClass() const { - XClassHint ch; - - if (XGetClassHint(FbTk::App::instance()->display(), window(), &ch) == 0) { -#ifdef DEBUG - cerr<<"Failed to read class hint!"<(ch.res_class); XFree(ch.res_class); + ch.res_class = 0; } else m_class_name = ""; - return m_class_name; } } -- cgit v0.11.2