aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-07-28 20:11:55 (GMT)
committerfluxgen <fluxgen>2003-07-28 20:11:55 (GMT)
commitc73dafb79ccd5a8363c0d445c9b432fa44ac0e94 (patch)
tree65f9354ef259ad173545483b9edda434a1add66e /src
parent8c26f29b2fecdda9f414e287e1fbcbfbab0e9c36 (diff)
downloadfluxbox_paul-c73dafb79ccd5a8363c0d445c9b432fa44ac0e94.zip
fluxbox_paul-c73dafb79ccd5a8363c0d445c9b432fa44ac0e94.tar.bz2
added kde dockapp test in createWindow
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc51
1 files changed, 50 insertions, 1 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index 73703eb..3a48419 100644
--- a/src/Screen.cc
+++ b/src/Screen.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: Screen.cc,v 1.210 2003/07/28 18:28:03 fluxgen Exp $ 25// $Id: Screen.cc,v 1.211 2003/07/28 20:11:55 fluxgen Exp $
26 26
27 27
28#include "Screen.hh" 28#include "Screen.hh"
@@ -1063,6 +1063,55 @@ void BScreen::updateNetizenConfigNotify(XEvent &e) {
1063 1063
1064FluxboxWindow *BScreen::createWindow(Window client) { 1064FluxboxWindow *BScreen::createWindow(Window client) {
1065 XSync(FbTk::App::instance()->display(), false); 1065 XSync(FbTk::App::instance()->display(), false);
1066
1067#ifdef SLIT
1068#ifdef KDE
1069 //Check and see if client is KDE dock applet.
1070 //If so add to Slit
1071 bool iskdedockapp = false;
1072 Atom ajunk;
1073 int ijunk;
1074 unsigned long *data = (unsigned long *) 0, uljunk;
1075 Display *disp = FbTk::App::instance()->display();
1076 // Check if KDE v2.x dock applet
1077 if (XGetWindowProperty(disp, client,
1078 XInternAtom(FbTk::App::instance()->display(),
1079 "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False),
1080 0l, 1l, False,
1081 XA_WINDOW, &ajunk, &ijunk, &uljunk,
1082 &uljunk, (unsigned char **) &data) == Success) {
1083
1084 if (data)
1085 iskdedockapp = True;
1086 XFree((void *) data);
1087 data = 0;
1088 }
1089
1090 // Check if KDE v1.x dock applet
1091 if (!iskdedockapp) {
1092 Atom kwm1 = XInternAtom(FbTk::App::instance()->display(),
1093 "KWM_DOCKWINDOW", False);
1094 if (XGetWindowProperty(disp, client,
1095 kwm1, 0l, 1l, False,
1096 kwm1, &ajunk, &ijunk, &uljunk,
1097 &uljunk, (unsigned char **) &data) == Success && data) {
1098 iskdedockapp = (data && data[0] != 0);
1099 XFree((void *) data);
1100 data = 0;
1101 }
1102 }
1103
1104 if (iskdedockapp) {
1105 XSelectInput(disp, client, StructureNotifyMask);
1106
1107 if (slit())
1108 slit()->addClient(client);
1109
1110 return 0; // dont create a FluxboxWindow for this one
1111 }
1112#endif // KDE
1113#endif // SLIT
1114
1066 WinClient *winclient = new WinClient(client, *this); 1115 WinClient *winclient = new WinClient(client, *this);
1067 1116
1068 if (winclient->initial_state == WithdrawnState) { 1117 if (winclient->initial_state == WithdrawnState) {