summaryrefslogtreecommitdiff
path: root/fullscreen-shell
diff options
context:
space:
mode:
authorDerek Foreman <derekf@osg.samsung.com>2015-07-15 13:00:47 -0500
committerBryce Harrington <bryce@osg.samsung.com>2015-07-31 15:16:06 -0700
commitb41b59e2fae83124f90ce54b6ae3f088bfec3338 (patch)
tree7b90481c0b31bbf5c7d7f17cc64006d560033117 /fullscreen-shell
parent006cf67c77d0587f3ead1c7551a542516cb19bf1 (diff)
fullscreen-shell: Test for device presence properly
We should be testing device counts, not pointers. The pointers are persistent state that never gets freed, and are an inaccurate indicator of device presence after the last release. Signed-off-by: Derek Foreman <derekf@osg.samsung.com> Reviewed-by: Jonas Ã…dahl <jadahl@gmail.com>
Diffstat (limited to 'fullscreen-shell')
-rw-r--r--fullscreen-shell/fullscreen-shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fullscreen-shell/fullscreen-shell.c b/fullscreen-shell/fullscreen-shell.c
index ab9c420b..cae6ed5f 100644
--- a/fullscreen-shell/fullscreen-shell.c
+++ b/fullscreen-shell/fullscreen-shell.c
@@ -102,7 +102,7 @@ seat_caps_changed(struct wl_listener *l, void *data)
listener = container_of(l, struct pointer_focus_listener, seat_caps);
/* no pointer */
- if (seat->pointer) {
+ if (seat->pointer_device_count) {
if (!listener->pointer_focus.link.prev) {
wl_signal_add(&seat->pointer->focus_signal,
&listener->pointer_focus);
@@ -113,7 +113,7 @@ seat_caps_changed(struct wl_listener *l, void *data)
}
}
- if (seat->keyboard && seat->keyboard->focus != NULL) {
+ if (seat->keyboard_device_count && seat->keyboard->focus != NULL) {
wl_list_for_each(fsout, &listener->shell->output_list, link) {
if (fsout->surface) {
weston_surface_activate(fsout->surface, seat);