Added handlign of _NET_WM_PING.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/back/trunk@23148 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2006-07-08 23:33:50 +00:00
parent faa85c4312
commit 22ce633be4
4 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2006-07-09 Fred Kiefer <FredKiefer@gmx.de>
* Header/x11/XGGeneric.h,
* Source/x11/XGServerWindow.m (-_setupRootWindow, -window::::),
* Source/x11/XGServerEvent.m (-processEvent:):
Impelemented hanlding for _NET_WM_PING.
2006-07-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/x11/XGServer.m:

View file

@ -69,6 +69,7 @@ struct XGGeneric {
Atom protocols_atom;
Atom delete_win_atom;
Atom take_focus_atom;
Atom net_wm_ping_atom;
Atom miniaturize_atom;
Atom win_decor_atom;
Atom titlebar_state_atom;

View file

@ -548,6 +548,14 @@ static int check_modifier (XEvent *xEvent, KeySym key_sym,
e = [self _handleTakeFocusAtom: xEvent
forContext: gcontext];
}
else if ((Atom)xEvent.xclient.data.l[0]
== generic.net_wm_ping_atom)
{
xEvent.xclient.window = RootWindow(dpy, cWin->screen);
XSendEvent(dpy, xEvent.xclient.window, False,
(SubstructureRedirectMask | SubstructureNotifyMask),
&xEvent);
}
}
else if (xEvent.xclient.message_type == dnd.XdndEnter)
{

View file

@ -785,6 +785,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
generic.protocols_atom = XInternAtom(dpy, "WM_PROTOCOLS", False);
generic.take_focus_atom = XInternAtom(dpy, "WM_TAKE_FOCUS", False);
generic.delete_win_atom = XInternAtom(dpy, "WM_DELETE_WINDOW", False);
generic.net_wm_ping_atom = XInternAtom(dpy, "_NET_WM_PING", False);
generic.miniaturize_atom
= XInternAtom(dpy, "_GNUSTEP_WM_MINIATURIZE_WINDOW", False);
generic.win_decor_atom = XInternAtom(dpy,"_GNUSTEP_WM_ATTR", False);
@ -1267,6 +1268,7 @@ static void setWindowHintsForStyle (Display *dpy, Window window,
window->numProtocols = 0;
window->protocols[window->numProtocols++] = generic.take_focus_atom;
window->protocols[window->numProtocols++] = generic.delete_win_atom;
window->protocols[window->numProtocols++] = generic.net_wm_ping_atom;
if ((generic.wm & XGWM_WINDOWMAKER) != 0)
{
window->protocols[window->numProtocols++] = generic.miniaturize_atom;