aboutsummaryrefslogtreecommitdiff
path: root/src/fluxbox.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-07-23 10:43:30 (GMT)
committerfluxgen <fluxgen>2003-07-23 10:43:30 (GMT)
commitcc062647d04ced5cc825cda04f77b27eaa1917d0 (patch)
tree8cc96cd45e1518c219e79488a638d3897ba9cb0d /src/fluxbox.cc
parent906a6b239589af29624bca151172c5e6a436bfc8 (diff)
downloadfluxbox-cc062647d04ced5cc825cda04f77b27eaa1917d0.zip
fluxbox-cc062647d04ced5cc825cda04f77b27eaa1917d0.tar.bz2
fixed kde dockapp bug
Diffstat (limited to 'src/fluxbox.cc')
-rw-r--r--src/fluxbox.cc57
1 files changed, 55 insertions, 2 deletions
diff --git a/src/fluxbox.cc b/src/fluxbox.cc
index 5bf54bc..dd371ee 100644
--- a/src/fluxbox.cc
+++ b/src/fluxbox.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: fluxbox.cc,v 1.173 2003/07/21 15:26:57 rathnor Exp $ 25// $Id: fluxbox.cc,v 1.174 2003/07/23 10:43:30 fluxgen Exp $
26 26
27#include "fluxbox.hh" 27#include "fluxbox.hh"
28 28
@@ -423,7 +423,14 @@ Fluxbox::Fluxbox(int argc, char **argv, const char *dpy_name, const char *rcfile
423 m_server_grabs(0), 423 m_server_grabs(0),
424 m_randr_event_type(0), 424 m_randr_event_type(0),
425 m_RC_PATH("fluxbox"), 425 m_RC_PATH("fluxbox"),
426 m_RC_INIT_FILE("init") { 426 m_RC_INIT_FILE("init"),
427 // For KDE dock applets
428 // KDE v1.x
429 m_kwm1_dockwindow(XInternAtom(FbTk::App::instance()->display(),
430 "KWM_DOCKWINDOW", False)),
431 // KDE v2.x
432 m_kwm2_dockwindow(XInternAtom(FbTk::App::instance()->display(),
433 "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False)) {
427 434
428 435
429 if (s_singleton != 0) 436 if (s_singleton != 0)
@@ -780,6 +787,52 @@ void Fluxbox::handleEvent(XEvent * const e) {
780 } 787 }
781 break; 788 break;
782 case MapRequest: { 789 case MapRequest: {
790#ifdef SLIT
791#ifdef KDE
792 //Check and see if client is KDE dock applet.
793 //If so add to Slit
794 bool iskdedockapp = false;
795 Atom ajunk;
796 int ijunk;
797 unsigned long *data = (unsigned long *) 0, uljunk;
798 Display *disp = FbTk::App::instance()->display();
799 // Check if KDE v2.x dock applet
800 if (XGetWindowProperty(disp, e->xmaprequest.window,
801 m_kwm2_dockwindow, 0l, 1l, False,
802 XA_WINDOW, &ajunk, &ijunk, &uljunk,
803 &uljunk, (unsigned char **) &data) == Success) {
804
805 if (data)
806 iskdedockapp = True;
807 XFree((void *) data);
808 data = 0;
809 }
810
811 // Check if KDE v1.x dock applet
812 if (!iskdedockapp) {
813 if (XGetWindowProperty(disp, e->xmaprequest.window,
814 m_kwm1_dockwindow, 0l, 1l, False,
815 m_kwm1_dockwindow, &ajunk, &ijunk, &uljunk,
816 &uljunk, (unsigned char **) &data) == Success && data) {
817 iskdedockapp = (data && data[0] != 0);
818 XFree((void *) data);
819 data = 0;
820 }
821 }
822
823 if (iskdedockapp) {
824 XSelectInput(disp, e->xmaprequest.window, StructureNotifyMask);
825 ScreenList::iterator it = m_screen_list.begin();
826 for (; (*it) == m_screen_list.back(); ++it) {
827 if ((*it)->slit())
828 (*it)->slit()->addClient(e->xmaprequest.window);
829 }
830
831 return; // dont create a FluxboxWindow for this one
832 }
833#endif // KDE
834#endif // SLIT
835
783#ifdef DEBUG 836#ifdef DEBUG
784 cerr<<"MapRequest for 0x"<<hex<<e->xmaprequest.window<<dec<<endl; 837 cerr<<"MapRequest for 0x"<<hex<<e->xmaprequest.window<<dec<<endl;
785#endif // DEBUG 838#endif // DEBUG