X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Fevent.c;h=025f1188fa2006fb23cad079c777b0b58f76ccd9;hb=3ae58f457bcdfa90b26dad4c9d192f045874ddae;hp=44e0f5328ed269cb46133264e8007e680b4a3704;hpb=5148b839fefe16b54f26bc0d2c7a500127cf2725;p=chaz%2Fopenbox diff --git a/openbox/event.c b/openbox/event.c index 44e0f532..025f1188 100644 --- a/openbox/event.c +++ b/openbox/event.c @@ -43,6 +43,7 @@ #include "stacking.h" #include "extensions.h" #include "translate.h" +#include "ping.h" #include #include @@ -102,8 +103,8 @@ static void focus_delay_client_dest(ObClient *client, gpointer data); Time event_curtime = CurrentTime; Time event_last_user_time = CurrentTime; /*! The serial of the current X event */ -gulong event_curserial; +static gulong event_curserial; static gboolean focus_left_screen = FALSE; /*! A list of ObSerialRanges which are to be ignored for mouse enter events */ static GSList *ignore_serials = NULL; @@ -767,6 +768,9 @@ static void event_handle_root(XEvent *e) ob_restart(); else if (e->xclient.data.l[0] == 3) ob_exit(0); + } else if (msgtype == prop_atoms.wm_protocols) { + if ((Atom)e->xclient.data.l[0] == prop_atoms.net_wm_ping) + ping_got_pong(e->xclient.data.l[1]); } break; case PropertyNotify: @@ -1914,7 +1918,7 @@ static void focus_delay_client_dest(ObClient *client, gpointer data) client, FALSE); } -void event_halt_focus_delay() +void event_halt_focus_delay(void) { /* ignore all enter events up till the event which caused this to occur */ if (event_curserial) event_ignore_enter_range(1, event_curserial);