]> Dogcows Code - chaz/openbox/blobdiff - openbox/event.c
focus new windows
[chaz/openbox] / openbox / event.c
index 51f93c3b73453b60a01f806a7f40aa55f91c86a6..b5f24eb84731d053e0fc2dafdcba35228c9752ae 100644 (file)
@@ -319,24 +319,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.020461 seconds and 4 git commands to generate.