test-client: initialize input instance.
In seat_handle_capabilities, if input->pointer is not properly initialized, then it will contain an arbitrary value and results in the wl_pointer listener not getting registered if that value is not 0/null. Thus, use calloc to initialize the "input" instance. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=49937 Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
This commit is contained in:
committed by
Kristian Høgsberg
parent
680275fbf1
commit
13dc708ab7
+1
-1
@@ -250,7 +250,7 @@ handle_global(struct wl_display *_display, uint32_t id,
|
|||||||
wl_display_bind(display->display,
|
wl_display_bind(display->display,
|
||||||
id, &wl_compositor_interface);
|
id, &wl_compositor_interface);
|
||||||
} else if (strcmp(interface, "wl_seat") == 0) {
|
} else if (strcmp(interface, "wl_seat") == 0) {
|
||||||
input = malloc(sizeof *input);
|
input = calloc(1, sizeof *input);
|
||||||
input->seat = wl_display_bind(display->display, id,
|
input->seat = wl_display_bind(display->display, id,
|
||||||
&wl_seat_interface);
|
&wl_seat_interface);
|
||||||
input->pointer_focus = NULL;
|
input->pointer_focus = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user