summaryrefslogtreecommitdiff
path: root/src/CurrentWindowCmd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/CurrentWindowCmd.cc')
-rw-r--r--src/CurrentWindowCmd.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/CurrentWindowCmd.cc b/src/CurrentWindowCmd.cc
index 59b0186..dfb5c19 100644
--- a/src/CurrentWindowCmd.cc
+++ b/src/CurrentWindowCmd.cc
@@ -467,13 +467,17 @@ void SetLayerCmd::real_execute() {
467} 467}
468 468
469namespace { 469namespace {
470class SetTitleDialog: public TextDialog { 470class SetTitleDialog: public TextDialog, public FbTk::Observer {
471public: 471public:
472 SetTitleDialog(FluxboxWindow &win, const string &title): 472 SetTitleDialog(FluxboxWindow &win, const string &title):
473 TextDialog(win.screen(), title), window(win) { 473 TextDialog(win.screen(), title), window(win) {
474 win.dieSig().attach(this);
474 setText(win.title()); 475 setText(win.title());
475 } 476 }
476 477
478 // only attached signal is window destruction
479 void update(FbTk::Subject *subj) { delete this; }
480
477private: 481private:
478 void exec(const std::string &text) { 482 void exec(const std::string &text) {
479 window.winClient().setTitle(text); 483 window.winClient().setTitle(text);