Send keyboard_focus only to client surfaces
authorBenjamin Franzke <benjaminfranzke@googlemail.com>
Thu, 23 Jun 2011 21:30:30 +0000 (23:30 +0200)
committerBenjamin Franzke <benjaminfranzke@googlemail.com>
Thu, 23 Jun 2011 21:30:30 +0000 (23:30 +0200)
compositor/compositor.c

index 5259976..4d5b652 100644 (file)
@@ -1471,8 +1471,9 @@ notify_keyboard_focus(struct wl_input_device *device,
                        update_modifier_state(wd, *k, 1);
                }
 
-               wl_input_device_set_keyboard_focus(&wd->input_device,
-                                                  &es->surface, time);
+               if (es->surface.client)
+                       wl_input_device_set_keyboard_focus(&wd->input_device,
+                                                          &es->surface, time);
        } else {
                end = device->keys.data + device->keys.size;
                for (k = device->keys.data; k < end; k++)