aboutsummaryrefslogtreecommitdiff
path: root/src/Window.cc
diff options
context:
space:
mode:
authorPavel Labath <pavelo@centrum.sk>2011-05-06 21:17:13 (GMT)
committerPavel Labath <pavelo@centrum.sk>2011-05-10 11:00:46 (GMT)
commit2073ae12a4e633d18f49559111131fffbc495dbd (patch)
tree66d42e79fc90f58ddb38fa105e4cc68b63362cb5 /src/Window.cc
parentff49160b120edd8d9396f10dab5a97bace8724ec (diff)
downloadfluxbox-2073ae12a4e633d18f49559111131fffbc495dbd.zip
fluxbox-2073ae12a4e633d18f49559111131fffbc495dbd.tar.bz2
Convert FbWinFrame::frameExtentSig to FbTk::Signal
Also, I spotted a potential bug in the code. I marked the place with XXX. Someone should take a look at that.
Diffstat (limited to 'src/Window.cc')
-rw-r--r--src/Window.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Window.cc b/src/Window.cc
index b3c0698..6e60a80 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -288,7 +288,7 @@ FluxboxWindow::FluxboxWindow(WinClient &client):
288 m_resize_corner(RIGHTBOTTOM) { 288 m_resize_corner(RIGHTBOTTOM) {
289 289
290 join(m_theme.reconfigSig(), FbTk::MemFun(*this, &FluxboxWindow::themeReconfigured)); 290 join(m_theme.reconfigSig(), FbTk::MemFun(*this, &FluxboxWindow::themeReconfigured));
291 m_frame.frameExtentSig().attach(this); 291 join(m_frame.frameExtentSig(), FbTk::MemFun(*this, &FluxboxWindow::frameExtentChanged));
292 292
293 init(); 293 init();
294 294
@@ -538,7 +538,7 @@ void FluxboxWindow::init() {
538 gettimeofday(&now, NULL); 538 gettimeofday(&now, NULL);
539 m_creation_time = now.tv_sec; 539 m_creation_time = now.tv_sec;
540 540
541 frame().frameExtentSig().notify(); 541 frame().frameExtentSig().emit();
542 542
543 setupWindow(); 543 setupWindow();
544 544
@@ -1452,6 +1452,7 @@ void FluxboxWindow::setFullscreenLayer() {
1452void FluxboxWindow::attachWorkAreaSig() { 1452void FluxboxWindow::attachWorkAreaSig() {
1453 // notify when struts change, so we can resize accordingly 1453 // notify when struts change, so we can resize accordingly
1454 // Subject checks for duplicates for us 1454 // Subject checks for duplicates for us
1455 // XXX: this is no longer true with signals
1455 if (m_state.maximized || m_state.fullscreen) 1456 if (m_state.maximized || m_state.fullscreen)
1456 join(screen().workspaceAreaSig(), 1457 join(screen().workspaceAreaSig(),
1457 FbTk::MemFun(*this, &FluxboxWindow::workspaceAreaChanged)); 1458 FbTk::MemFun(*this, &FluxboxWindow::workspaceAreaChanged));
@@ -2677,8 +2678,8 @@ void FluxboxWindow::setTitle(const std::string& title, Focusable &client) {
2677 titleSig().emit(title, *this); 2678 titleSig().emit(title, *this);
2678} 2679}
2679 2680
2680void FluxboxWindow::update(FbTk::Subject *subj) { 2681void FluxboxWindow::frameExtentChanged() {
2681 if (m_initialized && subj == &m_frame.frameExtentSig()) { 2682 if (m_initialized) {
2682 Fluxbox::instance()->updateFrameExtents(*this); 2683 Fluxbox::instance()->updateFrameExtents(*this);
2683 sendConfigureNotify(); 2684 sendConfigureNotify();
2684 } 2685 }