all repos — fluxbox @ c73dafb79ccd5a8363c0d445c9b432fa44ac0e94

custom fork of the fluxbox windowmanager

added kde dockapp test in createWindow
fluxgen fluxgen
commit

c73dafb79ccd5a8363c0d445c9b432fa44ac0e94

parent

8c26f29b2fecdda9f414e287e1fbcbfbab0e9c36

1 files changed, 50 insertions(+), 1 deletions(-)

jump to
M src/Screen.ccsrc/Screen.cc

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Screen.cc,v 1.210 2003/07/28 18:28:03 fluxgen Exp $ +// $Id: Screen.cc,v 1.211 2003/07/28 20:11:55 fluxgen Exp $ #include "Screen.hh"

@@ -1063,6 +1063,55 @@ }

FluxboxWindow *BScreen::createWindow(Window client) { XSync(FbTk::App::instance()->display(), false); + +#ifdef SLIT +#ifdef KDE + //Check and see if client is KDE dock applet. + //If so add to Slit + bool iskdedockapp = false; + Atom ajunk; + int ijunk; + unsigned long *data = (unsigned long *) 0, uljunk; + Display *disp = FbTk::App::instance()->display(); + // Check if KDE v2.x dock applet + if (XGetWindowProperty(disp, client, + XInternAtom(FbTk::App::instance()->display(), + "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False), + 0l, 1l, False, + XA_WINDOW, &ajunk, &ijunk, &uljunk, + &uljunk, (unsigned char **) &data) == Success) { + + if (data) + iskdedockapp = True; + XFree((void *) data); + data = 0; + } + + // Check if KDE v1.x dock applet + if (!iskdedockapp) { + Atom kwm1 = XInternAtom(FbTk::App::instance()->display(), + "KWM_DOCKWINDOW", False); + if (XGetWindowProperty(disp, client, + kwm1, 0l, 1l, False, + kwm1, &ajunk, &ijunk, &uljunk, + &uljunk, (unsigned char **) &data) == Success && data) { + iskdedockapp = (data && data[0] != 0); + XFree((void *) data); + data = 0; + } + } + + if (iskdedockapp) { + XSelectInput(disp, client, StructureNotifyMask); + + if (slit()) + slit()->addClient(client); + + return 0; // dont create a FluxboxWindow for this one + } +#endif // KDE +#endif // SLIT + WinClient *winclient = new WinClient(client, *this); if (winclient->initial_state == WithdrawnState) {