diff options
author | markt <markt> | 2007-07-03 18:50:53 (GMT) |
---|---|---|
committer | markt <markt> | 2007-07-03 18:50:53 (GMT) |
commit | b70f4c144c0428324952f40939b2ada2a2d173a9 (patch) | |
tree | d0cf56fc29b4eaf58144b04d3fcc4246e1b6ad2f /src/Screen.cc | |
parent | 86031f9c75d7dada8fd61e5a0059d54fa42ce099 (diff) | |
download | fluxbox_pavel-b70f4c144c0428324952f40939b2ada2a2d173a9.zip fluxbox_pavel-b70f4c144c0428324952f40939b2ada2a2d173a9.tar.bz2 |
fix updating of systemtray and kde dockapps in slit on background change
added fluxbox-remote.cc
Diffstat (limited to 'src/Screen.cc')
-rw-r--r-- | src/Screen.cc | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/Screen.cc b/src/Screen.cc index 7648f78..68f928b 100644 --- a/src/Screen.cc +++ b/src/Screen.cc | |||
@@ -344,6 +344,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm, | |||
344 | m_currentworkspace_sig(*this), // current workspace signal | 344 | m_currentworkspace_sig(*this), // current workspace signal |
345 | m_reconfigure_sig(*this), // reconfigure signal | 345 | m_reconfigure_sig(*this), // reconfigure signal |
346 | m_resize_sig(*this), | 346 | m_resize_sig(*this), |
347 | m_bg_change_sig(*this), | ||
347 | m_layermanager(num_layers), | 348 | m_layermanager(num_layers), |
348 | m_windowtheme(new FbWinFrameTheme(scrn)), | 349 | m_windowtheme(new FbWinFrameTheme(scrn)), |
349 | // the order of windowtheme and winbutton theme is important | 350 | // the order of windowtheme and winbutton theme is important |
@@ -782,6 +783,37 @@ void BScreen::update(FbTk::Subject *subj) { | |||
782 | 783 | ||
783 | } | 784 | } |
784 | 785 | ||
786 | void BScreen::propertyNotify(Atom atom) { | ||
787 | static Atom fbcmd_atom = XInternAtom(FbTk::App::instance()->display(), | ||
788 | "_FLUXBOX_COMMAND", False); | ||
789 | if (atom == fbcmd_atom) { | ||
790 | Atom xa_ret_type; | ||
791 | int ret_format; | ||
792 | unsigned long ret_nitems, ret_bytes_after; | ||
793 | char *str; | ||
794 | if (rootWindow().property(fbcmd_atom, 0l, 64l, | ||
795 | True, XA_STRING, &xa_ret_type, &ret_format, &ret_nitems, | ||
796 | &ret_bytes_after, (unsigned char **)&str) && str) { | ||
797 | |||
798 | if (ret_bytes_after) { | ||
799 | XFree(str); | ||
800 | long len = 64 + (ret_bytes_after + 3)/4; | ||
801 | rootWindow().property(fbcmd_atom, 0l, len, | ||
802 | True, XA_STRING, &xa_ret_type, &ret_format, &ret_nitems, | ||
803 | &ret_bytes_after, (unsigned char **)&str); | ||
804 | } | ||
805 | |||
806 | FbTk::RefCount<FbTk::Command> cmd(CommandParser::instance().parseLine(str)); | ||
807 | if (cmd.get()) | ||
808 | cmd->execute(); | ||
809 | XFree(str); | ||
810 | |||
811 | } | ||
812 | // TODO: this doesn't belong in FbPixmap | ||
813 | } else if (FbTk::FbPixmap::rootwinPropertyNotify(screenNumber(), atom)) | ||
814 | m_bg_change_sig.notify(); | ||
815 | } | ||
816 | |||
785 | void BScreen::keyPressEvent(XKeyEvent &ke) { | 817 | void BScreen::keyPressEvent(XKeyEvent &ke) { |
786 | Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode); | 818 | Fluxbox::instance()->keys()->doAction(ke.type, ke.state, ke.keycode); |
787 | } | 819 | } |
@@ -1353,7 +1385,6 @@ void BScreen::updateNetizenConfigNotify(XEvent &e) { | |||
1353 | 1385 | ||
1354 | bool BScreen::isKdeDockapp(Window client) const { | 1386 | bool BScreen::isKdeDockapp(Window client) const { |
1355 | //Check and see if client is KDE dock applet. | 1387 | //Check and see if client is KDE dock applet. |
1356 | //If so add to Slit | ||
1357 | bool iskdedockapp = false; | 1388 | bool iskdedockapp = false; |
1358 | Atom ajunk; | 1389 | Atom ajunk; |
1359 | int ijunk; | 1390 | int ijunk; |