remember on the class AND instance name by default
simonb simonb
2 files changed,
12 insertions(+),
1 deletions(-)
M
ChangeLog
→
ChangeLog
@@ -1,6 +1,10 @@
(Format: Year/Month/Day) Changes for 1.0.0: *07/08/05: + * When saving window info for rememberm use class name AND instance name. + This should fix firefox/thunderbird issues, but note that mplayer (nogui) + sets the vo driver name as the instance name. (Simon) + Remember.cc * Fix menu heading encoding (Simon) sf.net bug #1712583: NLS:Non-latin characters displayed incorrectly in menu title MenuCreator.cc
M
src/Remember.cc
→
src/Remember.cc
@@ -318,15 +318,22 @@ Application * Remember::add(WinClient &winclient) {
ClientPattern *p = new ClientPattern(); Application *app = new Application(0); - // by default, we match against the WMClass of a window. + // by default, we match against the WMClass of a window (instance and class strings) + string win_name = p->getProperty(ClientPattern::NAME, winclient); string win_class = p->getProperty(ClientPattern::CLASS, winclient); // replace special chars like ( ) and [ ] with \( \) and \[ \] + win_name = FbTk::StringUtil::replaceString(win_name, "(", "\\("); + win_name = FbTk::StringUtil::replaceString(win_name, ")", "\\)"); + win_name = FbTk::StringUtil::replaceString(win_name, "[", "\\["); + win_name = FbTk::StringUtil::replaceString(win_name, "]", "\\]"); + win_class = FbTk::StringUtil::replaceString(win_class, "(", "\\("); win_class = FbTk::StringUtil::replaceString(win_class, ")", "\\)"); win_class = FbTk::StringUtil::replaceString(win_class, "[", "\\["); win_class = FbTk::StringUtil::replaceString(win_class, "]", "\\]"); + p->addTerm(win_name, ClientPattern::NAME); p->addTerm(win_class, ClientPattern::CLASS); m_clients[&winclient] = app; p->addMatch();