X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=openbox%2Ffocus.c;h=0674c8ff0e5c0a0b95705bb5d4060c72ddf18a23;hb=c5789fea10f24163465292430a068f4d2ae33f39;hp=3c7b635baaa23b0712bce29cd7b9c445fbd4b5fa;hpb=f8a47de5ec444c452093371e3db16857eb39a490;p=chaz%2Fopenbox diff --git a/openbox/focus.c b/openbox/focus.c index 3c7b635b..0674c8ff 100644 --- a/openbox/focus.c +++ b/openbox/focus.c @@ -2,7 +2,7 @@ #include "client.h" #include "screen.h" #include "prop.h" -#include "hooks.h" +#include "dispatch.h" #include @@ -47,11 +47,15 @@ void focus_set_client(Client *client) XSetInputFocus(ob_display, focus_backup, RevertToNone, CurrentTime); } + if (focus_client != NULL) + dispatch_client(Event_Client_Unfocus, focus_client, 0, 0); + focus_client = client; /* set the NET_ACTIVE_WINDOW hint */ active = client ? client->window : None; PROP_SET32(ob_root, net_active_window, window, active); - HOOKFIRECLIENT(focused, client); + if (focus_client != NULL) + dispatch_client(Event_Client_Focus, focus_client, 0, 0); }