summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2008-01-15 20:48:28 -0500
committerDana Jansens <danakj@orodu.net>2008-01-15 20:48:28 -0500
commitd790dc162d24cfdcc236114b50c51af62612646a (patch)
treef65258522a138ef63cc3d73401ec1460803a14aa
parent2b5d4b69974aba63f0c22cd5e4b91c456cd70f68 (diff)
check if a client will respond to pings
-rw-r--r--openbox/client.c4
-rw-r--r--openbox/client.h3
-rw-r--r--openbox/prop.c2
-rw-r--r--openbox/prop.h2
4 files changed, 9 insertions, 2 deletions
diff --git a/openbox/client.c b/openbox/client.c
index 5e4e52e7..7019f690 100644
--- a/openbox/client.c
+++ b/openbox/client.c
@@ -1507,6 +1507,10 @@ void client_update_protocols(ObClient *self)
/* if this protocol is requested, then the window will be
notified whenever we want it to receive focus */
self->focus_notify = TRUE;
+ else if (proto[i] == prop_atoms.net_wm_ping)
+ /* if this protocol is requested, then the window will allow
+ pings to determine if it is still alive */
+ self->ping = TRUE;
#ifdef SYNC
else if (proto[i] == prop_atoms.net_wm_sync_request)
/* if this protocol is requested, then resizing the
diff --git a/openbox/client.h b/openbox/client.h
index e83a6b7a..49ff72bc 100644
--- a/openbox/client.h
+++ b/openbox/client.h
@@ -220,6 +220,9 @@ struct _ObClient
/*! Notify the window when it receives focus? */
gboolean focus_notify;
+ /*! Will the client respond to pings? */
+ gboolean ping;
+
#ifdef SYNC
/*! The client wants to sync during resizes */
gboolean sync_request;
diff --git a/openbox/prop.c b/openbox/prop.c
index 44abdfe6..1e343e16 100644
--- a/openbox/prop.c
+++ b/openbox/prop.c
@@ -98,7 +98,7 @@ void prop_startup(void)
CREATE(kde_net_wm_frame_strut, "_KDE_NET_WM_FRAME_STRUT");
CREATE(net_frame_extents, "_NET_FRAME_EXTENTS");
-/* CREATE(net_wm_ping, "_NET_WM_PING"); */
+ CREATE(net_wm_ping, "_NET_WM_PING");
#ifdef SYNC
CREATE(net_wm_sync_request, "_NET_WM_SYNC_REQUEST");
CREATE(net_wm_sync_request_counter, "_NET_WM_SYNC_REQUEST_COUNTER");
diff --git a/openbox/prop.h b/openbox/prop.h
index f0c4f5e9..fd12f98a 100644
--- a/openbox/prop.h
+++ b/openbox/prop.h
@@ -136,7 +136,7 @@ typedef struct Atoms {
Atom net_frame_extents;
/* application protocols */
-/* Atom net_wm_ping; */
+ Atom net_wm_ping;
#ifdef SYNC
Atom net_wm_sync_request;
Atom net_wm_sync_request_counter;