diff --git a/src/WinClient.cc b/src/WinClient.cc index f44edc31..ea29bc22 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; } }