Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 217925
Collapse All | Expand All

(-)utils/linux/traydock/libtray.c (-10 / +10 lines)
Lines 164-170 Link Here
164
	Window root, parent, *children;
164
	Window root, parent, *children;
165
	unsigned int n, ret, atom;
165
	unsigned int n, ret, atom;
166
	TrayIcon *icon= clientData;
166
	TrayIcon *icon= clientData;
167
	char* wm_name = get_wm_name();
167
	char* wm_name;
168
168
169
	Tk_MapWindow(icon->win);
169
	Tk_MapWindow(icon->win);
170
170
Lines 178-197 Link Here
178
178
179
	Tk_UnmapWindow(icon->win);
179
	Tk_UnmapWindow(icon->win);
180
180
181
	if (wm_name != NULL && !strcmp(wm_name, "KWin")) {
181
	if ( (atom = XInternAtom(display, "_NET_SYSTEM_TRAY_OPCODE", True )) == None ) {
182
182
		wm_name = get_wm_name();
183
		atom = XInternAtom(display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False);
183
		if (wm_name != NULL && !strcmp(wm_name, "KWin")) {
184
184
			atom = XInternAtom(display, "_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR", False);
185
		ret = XChangeProperty(display, parent, atom,
185
			ret = XChangeProperty(display, parent, atom,
186
				XA_WINDOW, 32, PropModeReplace, (unsigned char *)&parent, 1);
186
				XA_WINDOW, 32, PropModeReplace, (unsigned char *)&parent, 1);
187
		Tk_MapWindow(icon->win);
187
			Tk_MapWindow(icon->win);
188
		}
189
		XFree(wm_name);
188
	} else {
190
	} else {
189
		send_message(display,systemtray,XInternAtom (display, "_NET_SYSTEM_TRAY_OPCODE", False ),
191
		send_message(display,systemtray, atom,
190
				SYSTEM_TRAY_REQUEST_DOCK,Tk_WindowId(icon->win),0,0);
192
				SYSTEM_TRAY_REQUEST_DOCK,Tk_WindowId(icon->win),0,0);
191
	}
193
	}
192
194
193
	XFree(wm_name);
194
195
}
195
}
196
196
197
/* Draw the icon */
197
/* Draw the icon */

Return to bug 217925