aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-29 10:30:46 (GMT)
committerfluxgen <fluxgen>2003-08-29 10:30:46 (GMT)
commite90cbd35e0fa3deb864e7fcd8777de0ab56c6013 (patch)
tree52eec24c2557d699ee2119a363460e9695a95873
parent359037659a46cc26e422a3eccfa25fe827075db4 (diff)
downloadfluxbox_paul-e90cbd35e0fa3deb864e7fcd8777de0ab56c6013.zip
fluxbox_paul-e90cbd35e0fa3deb864e7fcd8777de0ab56c6013.tar.bz2
slit as an observer
-rw-r--r--src/Slit.cc12
-rw-r--r--src/Slit.hh6
2 files changed, 13 insertions, 5 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index fa03f53..a9a3f35 100644
--- a/src/Slit.cc
+++ b/src/Slit.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Slit.cc,v 1.78 2003/08/15 13:50:42 fluxgen Exp $ 25// $Id: Slit.cc,v 1.79 2003/08/29 10:30:46 fluxgen Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -260,9 +260,8 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
260 "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False)), //KDE v2.x 260 "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False)), //KDE v2.x
261 261
262 m_layeritem(0), 262 m_layeritem(0),
263 m_slit_theme(new SlitTheme(*this)), 263 m_slit_theme(new SlitTheme(scr.rootWindow().screenNumber())),
264 m_strut(0), 264 m_strut(0),
265
266 // resources 265 // resources
267 // lock in first resource 266 // lock in first resource
268 m_rc_auto_hide(scr.resourceManager().lock(), false, 267 m_rc_auto_hide(scr.resourceManager().lock(), false,
@@ -281,6 +280,9 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
281 m_rc_layernum(scr.resourceManager(), Fluxbox::Layer(Fluxbox::instance()->getDockLayer()), 280 m_rc_layernum(scr.resourceManager(), Fluxbox::Layer(Fluxbox::instance()->getDockLayer()),
282 scr.name() + ".slit.layer", scr.altName() + ".Slit.Layer") { 281 scr.name() + ".slit.layer", scr.altName() + ".Slit.Layer") {
283 282
283 // attach to theme and root window change signal
284 m_slit_theme->reconfigSig().attach(this);
285 scr.resizeSig().attach(this);
284 286
285 frame.pixmap = None; 287 frame.pixmap = None;
286 // setup timer 288 // setup timer
@@ -1082,6 +1084,10 @@ void Slit::exposeEvent(XExposeEvent &ev) {
1082 } 1084 }
1083} 1085}
1084 1086
1087void Slit::update(FbTk::Subject *subj) {
1088 reconfigure();
1089}
1090
1085void Slit::clearWindow() { 1091void Slit::clearWindow() {
1086 frame.window.clear(); 1092 frame.window.clear();
1087 if (m_transp.get()) { 1093 if (m_transp.get()) {
diff --git a/src/Slit.hh b/src/Slit.hh
index 9b844e2..4209501 100644
--- a/src/Slit.hh
+++ b/src/Slit.hh
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25/// $Id: Slit.hh,v 1.37 2003/08/11 16:02:38 fluxgen Exp $ 25/// $Id: Slit.hh,v 1.38 2003/08/29 10:30:46 fluxgen Exp $
26 26
27#ifndef SLIT_HH 27#ifndef SLIT_HH
28#define SLIT_HH 28#define SLIT_HH
@@ -47,7 +47,7 @@ class FbMenu;
47class Strut; 47class Strut;
48 48
49/// Handles dock apps 49/// Handles dock apps
50class Slit: public FbTk::EventHandler { 50class Slit: public FbTk::EventHandler, public FbTk::Observer {
51public: 51public:
52 52
53 /** 53 /**
@@ -88,6 +88,8 @@ public:
88 void configureRequestEvent(XConfigureRequestEvent &event); 88 void configureRequestEvent(XConfigureRequestEvent &event);
89 void exposeEvent(XExposeEvent &event); 89 void exposeEvent(XExposeEvent &event);
90 //@} 90 //@}
91
92 void update(FbTk::Subject *subj);
91 93
92 void moveToLayer(int layernum); 94 void moveToLayer(int layernum);
93 void toggleHidden(); 95 void toggleHidden();