all repos — fluxbox @ 72479063aacfdaceb7bc6a4cfe9f263b78860aae

custom fork of the fluxbox windowmanager

minor fix
fluxgen fluxgen
commit

72479063aacfdaceb7bc6a4cfe9f263b78860aae

parent

01d069fbef74441df585a4c3094c3ac0fe6a0a2d

1 files changed, 8 insertions(+), 8 deletions(-)

jump to
M src/Remember.ccsrc/Remember.cc

@@ -21,7 +21,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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 @@ menu->update();

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!"<<endl; return 0; } else { - string m_instance_name; + string instance_name; if (ch.res_name != 0) { - m_instance_name = const_cast<char *>(ch.res_name); + instance_name = const_cast<char *>(ch.res_name); XFree(ch.res_name); } else - m_instance_name = ""; + instance_name = ""; if (ch.res_class != 0) { //m_class_name = const_cast<char *>(ch.res_class);

@@ -145,7 +145,7 @@ XFree(ch.res_class);

} else { //m_class_name = ""; } - return m_instance_name.c_str(); + return instance_name.c_str(); } }

@@ -177,11 +177,11 @@ return a;

} 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()); }