all repos — fluxbox @ 2006d20d45eaa091c737067004ec7421a0cfc730

custom fork of the fluxbox windowmanager

remember on the class AND instance name by default
simonb simonb
commit

2006d20d45eaa091c737067004ec7421a0cfc730

parent

f46660f711a1e48879087cfda08de43c1ab401c0

2 files changed, 12 insertions(+), 1 deletions(-)

jump to
M ChangeLogChangeLog

@@ -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.ccsrc/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();