From 72479063aacfdaceb7bc6a4cfe9f263b78860aae Mon Sep 17 00:00:00 2001 From: fluxgen Date: Thu, 5 Jun 2003 13:20:05 +0000 Subject: minor fix --- src/Remember.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Remember.cc b/src/Remember.cc index 2191a94..b22d62a 100644 --- a/src/Remember.cc +++ b/src/Remember.cc @@ -21,7 +21,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Remember.cc,v 1.20 2003/05/31 01:07:36 rathnor Exp $ +// $Id: Remember.cc,v 1.21 2003/06/05 13:20:05 fluxgen Exp $ #include "Remember.hh" #include "StringUtil.hh" @@ -125,19 +125,19 @@ FbTk::Menu *createRememberMenu(Remember &remember, FluxboxWindow &win) { return menu; }; -const char * getWMClass(Window w) { +std::string getWMClass(Window w) { XClassHint ch; if (XGetClassHint(FbTk::App::instance()->display(), w, &ch) == 0) { cerr<<"Failed to read class hint!"<(ch.res_name); + instance_name = const_cast(ch.res_name); XFree(ch.res_name); } else - m_instance_name = ""; + instance_name = ""; if (ch.res_class != 0) { //m_class_name = const_cast(ch.res_class); @@ -145,7 +145,7 @@ const char * getWMClass(Window w) { } else { //m_class_name = ""; } - return m_instance_name.c_str(); + return instance_name.c_str(); } } @@ -177,11 +177,11 @@ Application* Remember::add(const char* app_name) { } Application* Remember::find(WinClient &winclient) { - return find(getWMClass(winclient.window())); + return find(getWMClass(winclient.window()).c_str()); } Application* Remember::add(WinClient &winclient) { - return add(getWMClass(winclient.window())); + return add(getWMClass(winclient.window()).c_str()); } -- cgit v0.11.2