slit as an observer
This commit is contained in:
parent
359037659a
commit
e90cbd35e0
2 changed files with 13 additions and 5 deletions
12
src/Slit.cc
12
src/Slit.cc
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
// $Id: Slit.cc,v 1.78 2003/08/15 13:50:42 fluxgen Exp $
|
||||
// $Id: Slit.cc,v 1.79 2003/08/29 10:30:46 fluxgen Exp $
|
||||
|
||||
#include "Slit.hh"
|
||||
|
||||
|
@ -260,9 +260,8 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
|
|||
"_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False)), //KDE v2.x
|
||||
|
||||
m_layeritem(0),
|
||||
m_slit_theme(new SlitTheme(*this)),
|
||||
m_slit_theme(new SlitTheme(scr.rootWindow().screenNumber())),
|
||||
m_strut(0),
|
||||
|
||||
// resources
|
||||
// lock in first resource
|
||||
m_rc_auto_hide(scr.resourceManager().lock(), false,
|
||||
|
@ -281,6 +280,9 @@ Slit::Slit(BScreen &scr, FbTk::XLayer &layer, const char *filename)
|
|||
m_rc_layernum(scr.resourceManager(), Fluxbox::Layer(Fluxbox::instance()->getDockLayer()),
|
||||
scr.name() + ".slit.layer", scr.altName() + ".Slit.Layer") {
|
||||
|
||||
// attach to theme and root window change signal
|
||||
m_slit_theme->reconfigSig().attach(this);
|
||||
scr.resizeSig().attach(this);
|
||||
|
||||
frame.pixmap = None;
|
||||
// setup timer
|
||||
|
@ -1082,6 +1084,10 @@ void Slit::exposeEvent(XExposeEvent &ev) {
|
|||
}
|
||||
}
|
||||
|
||||
void Slit::update(FbTk::Subject *subj) {
|
||||
reconfigure();
|
||||
}
|
||||
|
||||
void Slit::clearWindow() {
|
||||
frame.window.clear();
|
||||
if (m_transp.get()) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
/// $Id: Slit.hh,v 1.37 2003/08/11 16:02:38 fluxgen Exp $
|
||||
/// $Id: Slit.hh,v 1.38 2003/08/29 10:30:46 fluxgen Exp $
|
||||
|
||||
#ifndef SLIT_HH
|
||||
#define SLIT_HH
|
||||
|
@ -47,7 +47,7 @@ class FbMenu;
|
|||
class Strut;
|
||||
|
||||
/// Handles dock apps
|
||||
class Slit: public FbTk::EventHandler {
|
||||
class Slit: public FbTk::EventHandler, public FbTk::Observer {
|
||||
public:
|
||||
|
||||
/**
|
||||
|
@ -88,6 +88,8 @@ public:
|
|||
void configureRequestEvent(XConfigureRequestEvent &event);
|
||||
void exposeEvent(XExposeEvent &event);
|
||||
//@}
|
||||
|
||||
void update(FbTk::Subject *subj);
|
||||
|
||||
void moveToLayer(int layernum);
|
||||
void toggleHidden();
|
||||
|
|
Loading…
Reference in a new issue