]> Dogcows Code - chaz/openbox/commitdiff
update engine last for focus events
authorDana Jansens <danakj@orodu.net>
Fri, 21 Mar 2003 08:17:43 +0000 (08:17 +0000)
committerDana Jansens <danakj@orodu.net>
Fri, 21 Mar 2003 08:17:43 +0000 (08:17 +0000)
openbox/event.c

index 51f93c3b73453b60a01f806a7f40aa55f91c86a6..43a3b23064853887a17d44832b9edb7f746fc236 100644 (file)
@@ -241,6 +241,7 @@ void event_process(XEvent *e)
            so back it is. if problems arise again, then try filtering on the
            detail instead of the mode. */
         if (e->xcrossing.mode != NotifyNormal) return;
+        g_print("%s\n", e->type == EnterNotify ? "EnterNotify":"LeaveNotify");
        break;
     }
 
@@ -319,24 +320,22 @@ static void event_handle_client(Client *client, XEvent *e)
      
     switch (e->type) {
     case FocusIn:
-       client->focused = TRUE;
-       engine_frame_adjust_focus(client->frame);
+        if (focus_client != client)
+            focus_set_client(client);
 
        /* focus state can affect the stacking layer */
        client_calc_layer(client);
 
-        if (focus_client != client)
-            focus_set_client(client);
+       engine_frame_adjust_focus(client->frame);
        break;
     case FocusOut:
-       client->focused = FALSE;
-       engine_frame_adjust_focus(client->frame);
+       if (focus_client == client)
+           focus_set_client(NULL);
 
        /* focus state can affect the stacking layer */
        client_calc_layer(client);
 
-       if (focus_client == client)
-           focus_set_client(NULL);
+       engine_frame_adjust_focus(client->frame);
        break;
     case ConfigureRequest:
        g_message("ConfigureRequest for window %lx", client->window);
This page took 0.025967 seconds and 4 git commands to generate.