diff --git a/include/wlr/types/wlr_cursor.h b/include/wlr/types/wlr_cursor.h index aaa18a437..041f735cf 100644 --- a/include/wlr/types/wlr_cursor.h +++ b/include/wlr/types/wlr_cursor.h @@ -49,30 +49,30 @@ struct wlr_cursor { * your responsibility. */ struct { - struct wl_signal motion; // struct wlr_pointer_motion_event - struct wl_signal motion_absolute; // struct wlr_pointer_motion_absolute_event - struct wl_signal button; // struct wlr_pointer_button_event - struct wl_signal axis; // struct wlr_pointer_axis_event + struct wl_signal motion; + struct wl_signal motion_absolute; + struct wl_signal button; + struct wl_signal axis; struct wl_signal frame; - struct wl_signal swipe_begin; // struct wlr_pointer_swipe_begin_event - struct wl_signal swipe_update; // struct wlr_pointer_swipe_update_event - struct wl_signal swipe_end; // struct wlr_pointer_swipe_end_event - struct wl_signal pinch_begin; // struct wlr_pointer_pinch_begin_event - struct wl_signal pinch_update; // struct wlr_pointer_pinch_update_event - struct wl_signal pinch_end; // struct wlr_pointer_pinch_end_event - struct wl_signal hold_begin; // struct wlr_pointer_hold_begin_event - struct wl_signal hold_end; // struct wlr_pointer_hold_end_event + struct wl_signal swipe_begin; + struct wl_signal swipe_update; + struct wl_signal swipe_end; + struct wl_signal pinch_begin; + struct wl_signal pinch_update; + struct wl_signal pinch_end; + struct wl_signal hold_begin; + struct wl_signal hold_end; - struct wl_signal touch_up; // struct wlr_touch_up_event - struct wl_signal touch_down; // struct wlr_touch_down_event - struct wl_signal touch_motion; // struct wlr_touch_motion_event - struct wl_signal touch_cancel; // struct wlr_touch_cancel_event + struct wl_signal touch_up; + struct wl_signal touch_down; + struct wl_signal touch_motion; + struct wl_signal touch_cancel; struct wl_signal touch_frame; - struct wl_signal tablet_tool_axis; // struct wlr_tablet_tool_axis_event - struct wl_signal tablet_tool_proximity; // struct wlr_tablet_tool_proximity_event - struct wl_signal tablet_tool_tip; // struct wlr_tablet_tool_tip_event - struct wl_signal tablet_tool_button; // struct wlr_tablet_tool_button_event + struct wl_signal tablet_tool_axis; + struct wl_signal tablet_tool_proximity; + struct wl_signal tablet_tool_tip; + struct wl_signal tablet_tool_button; } events; void *data; diff --git a/render/drm_syncobj.c b/render/drm_syncobj.c index e1a407a1e..912a2b6e5 100644 --- a/render/drm_syncobj.c +++ b/render/drm_syncobj.c @@ -167,9 +167,10 @@ bool wlr_drm_syncobj_timeline_check(struct wlr_drm_syncobj_timeline *timeline, etime = ETIME; #endif - int ret = drmSyncobjTimelineWait(timeline->drm_fd, &timeline->handle, &point, 1, 0, flags, NULL); + uint32_t signaled_point; + int ret = drmSyncobjTimelineWait(timeline->drm_fd, &timeline->handle, &point, 1, 0, flags, &signaled_point); if (ret != 0 && ret != -etime) { - wlr_log_errno(WLR_ERROR, "drmSyncobjTimelineWait() failed"); + wlr_log_errno(WLR_ERROR, "drmSyncobjWait() failed"); return false; } diff --git a/types/ext_image_capture_source_v1/scene.c b/types/ext_image_capture_source_v1/scene.c index 99d34e012..d3bf86b6c 100644 --- a/types/ext_image_capture_source_v1/scene.c +++ b/types/ext_image_capture_source_v1/scene.c @@ -173,6 +173,8 @@ static void source_update_buffer_constraints(struct scene_node_source *source, } static bool output_test(struct wlr_output *output, const struct wlr_output_state *state) { + struct scene_node_source *source = wl_container_of(output, source, output); + uint32_t supported = WLR_OUTPUT_STATE_BACKEND_OPTIONAL | WLR_OUTPUT_STATE_BUFFER | diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c index 8d0d77475..f2269db0f 100644 --- a/types/wlr_cursor.c +++ b/types/wlr_cursor.c @@ -956,7 +956,7 @@ static void handle_tablet_tool_axis(struct wl_listener *listener, void *data) { static void handle_tablet_tool_button(struct wl_listener *listener, void *data) { - struct wlr_tablet_tool_button_event *event = data; + struct wlr_tablet_tool_button *event = data; struct wlr_cursor_device *device; device = wl_container_of(listener, device, tablet_tool_button); wl_signal_emit_mutable(&device->cursor->events.tablet_tool_button, event); diff --git a/types/wlr_keyboard_group.c b/types/wlr_keyboard_group.c index 6005ba647..0ff6d93bb 100644 --- a/types/wlr_keyboard_group.c +++ b/types/wlr_keyboard_group.c @@ -308,7 +308,7 @@ void wlr_keyboard_group_remove_keyboard(struct wlr_keyboard_group *group, void wlr_keyboard_group_destroy(struct wlr_keyboard_group *group) { struct keyboard_group_device *device, *tmp_device; wl_list_for_each_safe(device, tmp_device, &group->devices, link) { - remove_keyboard_group_device(device); + wlr_keyboard_group_remove_keyboard(group, device->keyboard); } // Now group->keys might not be empty if a wlr_keyboard has emitted diff --git a/xwayland/selection/incoming.c b/xwayland/selection/incoming.c index 85d7775cd..72f82c279 100644 --- a/xwayland/selection/incoming.c +++ b/xwayland/selection/incoming.c @@ -381,15 +381,13 @@ static bool source_get_targets(struct wlr_xwm_selection *selection, free(mime_type); break; } + *mime_type_ptr = mime_type; xcb_atom_t *atom_ptr = wl_array_add(mime_types_atoms, sizeof(*atom_ptr)); if (atom_ptr == NULL) { - mime_types->size -= sizeof(*mime_type_ptr); - free(mime_type); break; } - *mime_type_ptr = mime_type; *atom_ptr = value[i]; } } diff --git a/xwayland/xwm.c b/xwayland/xwm.c index e44a11743..c8eac2ce1 100644 --- a/xwayland/xwm.c +++ b/xwayland/xwm.c @@ -1,6 +1,5 @@ #include #include -#include #include #include #include @@ -2882,20 +2881,5 @@ xcb_connection_t *wlr_xwayland_get_xwm_connection( } void xwm_schedule_flush(struct wlr_xwm *xwm) { - struct pollfd pollfd = { - .fd = xcb_get_file_descriptor(xwm->xcb_conn), - .events = POLLOUT, - }; - if (poll(&pollfd, 1, 0) < 0) { - wlr_log(WLR_ERROR, "poll() failed"); - return; - } - - // If we can write immediately, do so - if (pollfd.revents & POLLOUT) { - xcb_flush(xwm->xcb_conn); - return; - } - wl_event_source_fd_update(xwm->event_source, WL_EVENT_READABLE | WL_EVENT_WRITABLE); }