From 4eb44e13bc36950378ef4d81cc1fed95cf4188db Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Fri, 1 Dec 2000 20:43:26 +0000 Subject: [PATCH] Added the KDE 2 beta and final method of specifying systray windows. --- windows/x11drv/wnd.c | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/windows/x11drv/wnd.c b/windows/x11drv/wnd.c index 2043483c4ac..a0b1908d661 100644 --- a/windows/x11drv/wnd.c +++ b/windows/x11drv/wnd.c @@ -78,6 +78,8 @@ Atom dndSelection = None; Atom wmChangeState = None; Atom kwmDockWindow = None; +Atom _net_kde_system_tray_window_for = None; /* KDE 2 Beta */ +Atom _kde_net_wm_system_tray_window_for = None; /* KDE 2 Final */ /*********************************************************************** * X11DRV_WND_GetXWindow @@ -186,6 +188,10 @@ BOOL X11DRV_WND_CreateDesktopWindow(WND *wndPtr, CLASS *classPtr, BOOL bUnicode) wmChangeState = TSXInternAtom (display, "WM_CHANGE_STATE", False); if (kwmDockWindow == None) kwmDockWindow = TSXInternAtom( display, "KWM_DOCKWINDOW", False ); + if (_kde_net_wm_system_tray_window_for == None) + _kde_net_wm_system_tray_window_for = TSXInternAtom( display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False ); + if (_net_kde_system_tray_window_for == None) + _net_kde_system_tray_window_for = TSXInternAtom( display, "_NET_KDE_SYSTEM_TRAY_WINDOW_FOR", False ); ((X11DRV_WND_DATA *) wndPtr->pDriverData)->window = X11DRV_GetXRootWindow(); X11DRV_WND_RegisterWindow( wndPtr ); @@ -1131,11 +1137,36 @@ void X11DRV_WND_DockWindow(WND *wndPtr) { int data = 1; Window win = X11DRV_WND_GetXWindow(wndPtr); - if (kwmDockWindow == None) - return; /* no KDE running */ - TSXChangeProperty( - display,win,kwmDockWindow,kwmDockWindow,32,PropModeReplace,(char*)&data,1 - ); + if (kwmDockWindow != None) { + TSXChangeProperty( + display,win,kwmDockWindow,kwmDockWindow,32,PropModeReplace,(char*)&data,1 + ); + } + if (_kde_net_wm_system_tray_window_for != None) { + TSXChangeProperty( + display, + win, + _kde_net_wm_system_tray_window_for, + XA_WINDOW, + 32, + PropModeReplace, + (char*)&win, + 1 + ); + } + if (_net_kde_system_tray_window_for != None) { + TSXChangeProperty( + display, + win, + _net_kde_system_tray_window_for, + XA_WINDOW, + 32, + PropModeReplace, + (char*)&win, + 1 + ); + } + }