struct ds_tdm_output_hwc_window **changed_hwc_windows = NULL;
enum ds_tdm_output_hwc_window_composition composition;
struct tinyds_view *view;
- int i;
+ size_t i;
bool need_target = false;
bool fully_obscured = false;
struct ds_buffer *ds_buffer;
return;
}
- for (i = 0; i < num_changed; i++) {
+ for (i = 0; i < (size_t)num_changed; i++) {
composition = ds_tdm_output_hwc_window_get_composition(changed_hwc_windows[i]);
if (composition == DS_TDM_OUTPUT_HWC_WINDOW_COMPOSITION_CLIENT) {
need_target = true;
output->target_updated = false;
wl_list_for_each(view, &output->server->views, link) {
- enum ds_tdm_output_hwc_window_composition composition;
-
if (!view->mapped)
continue;
keyboard_handle_key(struct wl_listener *listener, void *data)
{
struct tinyds_keyboard *kbd;
- struct ds_event_keyboard_key *event = data;
+ struct ds_keyboard_event_key *event = data;
struct ds_keyboard *ds_keyboard;
struct xkb_state *xkb_state;
const xkb_keysym_t *syms;
static void
touch_handle_down(struct wl_listener *listener, void *data)
{
- struct ds_event_touch_down *event = data;
+ struct ds_touch_event_down *event = data;
struct tinyds_touch *touch;
struct tinyds_view *view;
struct tinyds_server *server;
touch = wl_container_of(listener, touch, down);
server = touch->server;
- server->output_x = event->x * server->output->width;
- server->output_y = event->y * server->output->height;
+ if (server->output) {
+ server->output_x = event->x * server->output->width;
+ server->output_y = event->y * server->output->height;
+ }
ds_inf("Touch(%p) event down: id(%d) x %.3f y %.3f output_x %.1f output_y %.1f",
touch->dev, event->id, event->x, event->y, server->output_x, server->output_y);
static void
touch_handle_up(struct wl_listener *listener, void *data)
{
- struct ds_event_touch_up *event = data;
+ struct ds_touch_event_up *event = data;
struct tinyds_touch *touch;
touch = wl_container_of(listener, touch, up);
static void
touch_handle_motion(struct wl_listener *listener, void *data)
{
- struct ds_event_touch_motion *event = data;
+ struct ds_touch_event_motion *event = data;
struct tinyds_touch *touch;
struct tinyds_view *view;
struct tinyds_server *server;
touch = wl_container_of(listener, touch, motion);
server = touch->server;
- server->output_x = event->x * server->output->width;
- server->output_y = event->y * server->output->height;
+ if (server->output) {
+ server->output_x = event->x * server->output->width;
+ server->output_y = event->y * server->output->height;
+ }
ds_inf("Touch(%p) event motion: id(%d) x %.3f y %.3f output_x %.1f output_y %.1f",
touch->dev, event->id, event->x, event->y, server->output_x, server->output_y);
pointer_handle_motion(struct wl_listener *listener, void *data)
{
struct tinyds_pointer *pointer;
- struct ds_event_pointer_motion *event = data;
+ struct ds_pointer_event_motion *event = data;
struct tinyds_view *view;
struct tinyds_server *server;
int ow = 0, oh = 0;
pointer_handle_button(struct wl_listener *listener, void *data)
{
struct tinyds_pointer *pointer;
- struct ds_event_pointer_button *event = data;
+ struct ds_pointer_event_button *event = data;
pointer = wl_container_of(listener, pointer, button);
{
*output_w = server->output->width;
*output_h = server->output->height;
-}
\ No newline at end of file
+}