aboutsummaryrefslogtreecommitdiff
path: root/src
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
parent906a6b239589af29624bca151172c5e6a436bfc8 (diff)
downloadfluxbox-cc062647d04ced5cc825cda04f77b27eaa1917d0.zip
fluxbox-cc062647d04ced5cc825cda04f77b27eaa1917d0.tar.bz2
fixed kde dockapp bug
Diffstat (limited to 'src')
-rw-r--r--src/Slit.cc41
-rw-r--r--src/fluxbox.cc57
-rw-r--r--src/fluxbox.hh3
3 files changed, 58 insertions, 43 deletions
diff --git a/src/Slit.cc b/src/Slit.cc
index da2b860..18a4c31 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.73 2003/07/19 11:55:49 rathnor Exp $ 25// $Id: Slit.cc,v 1.74 2003/07/23 10:42:12 fluxgen Exp $
26 26
27#include "Slit.hh" 27#include "Slit.hh"
28 28
@@ -969,45 +969,6 @@ void Slit::handleEvent(XEvent &event) {
969 removeClient(event.xdestroywindow.window, false); 969 removeClient(event.xdestroywindow.window, false);
970 } else if (event.type == UnmapNotify) { 970 } else if (event.type == UnmapNotify) {
971 removeClient(event.xunmap.window); 971 removeClient(event.xunmap.window);
972 } else if (event.type == MapRequest) {
973#ifdef KDE
974 //Check and see if client is KDE dock applet.
975 //If so add to Slit
976 bool iskdedockapp = false;
977 Atom ajunk;
978 int ijunk;
979 unsigned long *data = (unsigned long *) 0, uljunk;
980 Display *disp = FbTk::App::instance()->display();
981 // Check if KDE v2.x dock applet
982 if (XGetWindowProperty(disp, event.xmaprequest.window,
983 m_kwm2_dockwindow, 0l, 1l, False,
984 XA_WINDOW, &ajunk, &ijunk, &uljunk,
985 &uljunk, (unsigned char **) &data) == Success) {
986
987 if (data)
988 iskdedockapp = True;
989 XFree((void *) data);
990 data = 0;
991 }
992
993 // Check if KDE v1.x dock applet
994 if (!iskdedockapp) {
995 if (XGetWindowProperty(disp, event.xmaprequest.window,
996 m_kwm1_dockwindow, 0l, 1l, False,
997 m_kwm1_dockwindow, &ajunk, &ijunk, &uljunk,
998 &uljunk, (unsigned char **) &data) == Success && data) {
999 iskdedockapp = (data && data[0] != 0);
1000 XFree((void *) data);
1001 data = 0;
1002 }
1003 }
1004
1005 if (iskdedockapp) {
1006 XSelectInput(disp, event.xmaprequest.window, StructureNotifyMask);
1007 addClient(event.xmaprequest.window);
1008 }
1009#endif //KDE
1010
1011 } 972 }
1012} 973}
1013 974
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
diff --git a/src/fluxbox.hh b/src/fluxbox.hh
index 1975929..19f3d32 100644
--- a/src/fluxbox.hh
+++ b/src/fluxbox.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: fluxbox.hh,v 1.67 2003/07/19 13:51:24 rathnor Exp $ 25// $Id: fluxbox.hh,v 1.68 2003/07/23 10:43:30 fluxgen Exp $
26 26
27#ifndef FLUXBOX_HH 27#ifndef FLUXBOX_HH
28#define FLUXBOX_HH 28#define FLUXBOX_HH
@@ -281,6 +281,7 @@ private:
281 bool m_have_shape; ///< if shape is supported by server 281 bool m_have_shape; ///< if shape is supported by server
282 const char *m_RC_PATH; 282 const char *m_RC_PATH;
283 const char *m_RC_INIT_FILE; 283 const char *m_RC_INIT_FILE;
284 Atom m_kwm1_dockwindow, m_kwm2_dockwindow;
284}; 285};
285 286
286 287