aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/backend.c3
-rw-r--r--backend/drm/backend.c1
-rw-r--r--backend/drm/drm.c5
-rw-r--r--backend/headless/backend.c3
-rw-r--r--backend/headless/output.c3
-rw-r--r--backend/libinput/backend.c1
-rw-r--r--backend/libinput/events.c13
-rw-r--r--backend/libinput/pointer.c37
-rw-r--r--backend/libinput/switch.c3
-rw-r--r--backend/libinput/tablet_pad.c7
-rw-r--r--backend/libinput/tablet_tool.c11
-rw-r--r--backend/libinput/touch.c11
-rw-r--r--backend/multi/backend.c9
-rw-r--r--backend/session/session.c13
-rw-r--r--backend/wayland/backend.c1
-rw-r--r--backend/wayland/output.c3
-rw-r--r--backend/wayland/pointer.c31
-rw-r--r--backend/wayland/seat.c13
-rw-r--r--backend/wayland/tablet_v2.c29
-rw-r--r--backend/x11/backend.c3
-rw-r--r--backend/x11/input_device.c25
-rw-r--r--backend/x11/output.c7
-rw-r--r--render/allocator/allocator.c3
-rw-r--r--render/gles2/texture.c1
-rw-r--r--render/wlr_renderer.c3
-rw-r--r--types/data_device/wlr_data_device.c9
-rw-r--r--types/data_device/wlr_data_offer.c1
-rw-r--r--types/data_device/wlr_data_source.c3
-rw-r--r--types/data_device/wlr_drag.c19
-rw-r--r--types/output/cursor.c3
-rw-r--r--types/output/output.c23
-rw-r--r--types/scene/wlr_scene.c17
-rw-r--r--types/seat/wlr_seat.c5
-rw-r--r--types/seat/wlr_seat_keyboard.c7
-rw-r--r--types/seat/wlr_seat_pointer.c9
-rw-r--r--types/seat/wlr_seat_touch.c7
-rw-r--r--types/tablet_v2/wlr_tablet_v2.c3
-rw-r--r--types/tablet_v2/wlr_tablet_v2_pad.c7
-rw-r--r--types/tablet_v2/wlr_tablet_v2_tool.c3
-rw-r--r--types/wlr_buffer.c5
-rw-r--r--types/wlr_compositor.c13
-rw-r--r--types/wlr_cursor.c45
-rw-r--r--types/wlr_damage_ring.c1
-rw-r--r--types/wlr_data_control_v1.c5
-rw-r--r--types/wlr_drm.c3
-rw-r--r--types/wlr_drm_lease_v1.c3
-rw-r--r--types/wlr_export_dmabuf_v1.c3
-rw-r--r--types/wlr_foreign_toplevel_management_v1.c17
-rw-r--r--types/wlr_fullscreen_shell_v1.c5
-rw-r--r--types/wlr_gamma_control_v1.c3
-rw-r--r--types/wlr_idle.c11
-rw-r--r--types/wlr_idle_inhibit_v1.c7
-rw-r--r--types/wlr_input_device.c3
-rw-r--r--types/wlr_input_inhibitor.c7
-rw-r--r--types/wlr_input_method_v2.c21
-rw-r--r--types/wlr_keyboard.c11
-rw-r--r--types/wlr_keyboard_group.c5
-rw-r--r--types/wlr_keyboard_shortcuts_inhibit_v1.c7
-rw-r--r--types/wlr_layer_shell_v1.c13
-rw-r--r--types/wlr_linux_dmabuf_v1.c3
-rw-r--r--types/wlr_output_damage.c5
-rw-r--r--types/wlr_output_layout.c11
-rw-r--r--types/wlr_output_management_v1.c7
-rw-r--r--types/wlr_output_power_management_v1.c5
-rw-r--r--types/wlr_pointer_constraints_v1.c7
-rw-r--r--types/wlr_pointer_gestures_v1.c1
-rw-r--r--types/wlr_presentation_time.c3
-rw-r--r--types/wlr_primary_selection.c9
-rw-r--r--types/wlr_primary_selection_v1.c3
-rw-r--r--types/wlr_relative_pointer_v1.c7
-rw-r--r--types/wlr_screencopy_v1.c3
-rw-r--r--types/wlr_server_decoration.c9
-rw-r--r--types/wlr_session_lock_v1.c15
-rw-r--r--types/wlr_subcompositor.c9
-rw-r--r--types/wlr_text_input_v3.c13
-rw-r--r--types/wlr_viewporter.c3
-rw-r--r--types/wlr_virtual_keyboard_v1.c5
-rw-r--r--types/wlr_virtual_pointer_v1.c15
-rw-r--r--types/wlr_xdg_activation_v1.c7
-rw-r--r--types/wlr_xdg_decoration_v1.c13
-rw-r--r--types/wlr_xdg_foreign_registry.c5
-rw-r--r--types/wlr_xdg_foreign_v1.c3
-rw-r--r--types/wlr_xdg_foreign_v2.c3
-rw-r--r--types/wlr_xdg_output_v1.c3
-rw-r--r--types/xdg_shell/wlr_xdg_popup.c5
-rw-r--r--types/xdg_shell/wlr_xdg_shell.c5
-rw-r--r--types/xdg_shell/wlr_xdg_surface.c15
-rw-r--r--types/xdg_shell/wlr_xdg_toplevel.c23
-rw-r--r--xwayland/server.c5
-rw-r--r--xwayland/xwayland.c3
-rw-r--r--xwayland/xwm.c55
91 files changed, 365 insertions, 456 deletions
diff --git a/backend/backend.c b/backend/backend.c
index ac6e2165..32ddca97 100644
--- a/backend/backend.c
+++ b/backend/backend.c
@@ -17,7 +17,6 @@
#include "backend/backend.h"
#include "backend/multi.h"
#include "render/allocator/allocator.h"
-#include "util/signal.h"
#if WLR_HAS_DRM_BACKEND
#include <wlr/backend/drm.h>
@@ -44,7 +43,7 @@ void wlr_backend_init(struct wlr_backend *backend,
}
void wlr_backend_finish(struct wlr_backend *backend) {
- wlr_signal_emit_safe(&backend->events.destroy, backend);
+ wl_signal_emit_mutable(&backend->events.destroy, backend);
}
bool wlr_backend_start(struct wlr_backend *backend) {
diff --git a/backend/drm/backend.c b/backend/drm/backend.c
index 267bbfb2..e303bc8f 100644
--- a/backend/drm/backend.c
+++ b/backend/drm/backend.c
@@ -13,7 +13,6 @@
#include <wlr/util/log.h>
#include <xf86drm.h>
#include "backend/drm/drm.h"
-#include "util/signal.h"
struct wlr_drm_backend *get_drm_backend_from_backend(
struct wlr_backend *wlr_backend) {
diff --git a/backend/drm/drm.c b/backend/drm/drm.c
index 432f0427..9acb4175 100644
--- a/backend/drm/drm.c
+++ b/backend/drm/drm.c
@@ -29,7 +29,6 @@
#include "render/drm_format_set.h"
#include "render/swapchain.h"
#include "render/wlr_renderer.h"
-#include "util/signal.h"
// Output state which needs a KMS commit to be applied
static const uint32_t COMMIT_OUTPUT_STATE =
@@ -1411,7 +1410,7 @@ void scan_drm_connectors(struct wlr_drm_backend *drm,
struct wlr_drm_connector *conn = new_outputs[i];
wlr_drm_conn_log(conn, WLR_INFO, "Requesting modeset");
- wlr_signal_emit_safe(&drm->backend.events.new_output,
+ wl_signal_emit_mutable(&drm->backend.events.new_output,
&conn->output);
}
}
@@ -1664,7 +1663,7 @@ void wlr_drm_lease_terminate(struct wlr_drm_lease *lease) {
void drm_lease_destroy(struct wlr_drm_lease *lease) {
struct wlr_drm_backend *drm = lease->backend;
- wlr_signal_emit_safe(&lease->events.destroy, NULL);
+ wl_signal_emit_mutable(&lease->events.destroy, NULL);
struct wlr_drm_connector *conn;
wl_list_for_each(conn, &drm->outputs, link) {
diff --git a/backend/headless/backend.c b/backend/headless/backend.c
index b14dda4a..34536765 100644
--- a/backend/headless/backend.c
+++ b/backend/headless/backend.c
@@ -3,7 +3,6 @@
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
#include "backend/headless.h"
-#include "util/signal.h"
struct wlr_headless_backend *headless_backend_from_backend(
struct wlr_backend *wlr_backend) {
@@ -20,7 +19,7 @@ static bool backend_start(struct wlr_backend *wlr_backend) {
wl_list_for_each(output, &backend->outputs, link) {
wl_event_source_timer_update(output->frame_timer, output->frame_delay);
wlr_output_update_enabled(&output->wlr_output, true);
- wlr_signal_emit_safe(&backend->backend.events.new_output,
+ wl_signal_emit_mutable(&backend->backend.events.new_output,
&output->wlr_output);
}
diff --git a/backend/headless/output.c b/backend/headless/output.c
index 2ce15a16..5350747f 100644
--- a/backend/headless/output.c
+++ b/backend/headless/output.c
@@ -4,7 +4,6 @@
#include <wlr/interfaces/wlr_output.h>
#include <wlr/util/log.h>
#include "backend/headless.h"
-#include "util/signal.h"
static const uint32_t SUPPORTED_OUTPUT_STATE =
WLR_OUTPUT_STATE_BACKEND_OPTIONAL |
@@ -134,7 +133,7 @@ struct wlr_output *wlr_headless_add_output(struct wlr_backend *wlr_backend,
if (backend->started) {
wl_event_source_timer_update(output->frame_timer, output->frame_delay);
wlr_output_update_enabled(wlr_output, true);
- wlr_signal_emit_safe(&backend->backend.events.new_output, wlr_output);
+ wl_signal_emit_mutable(&backend->backend.events.new_output, wlr_output);
}
return wlr_output;
diff --git a/backend/libinput/backend.c b/backend/libinput/backend.c
index f47121db..02c2f64b 100644
--- a/backend/libinput/backend.c
+++ b/backend/libinput/backend.c
@@ -6,7 +6,6 @@
#include <wlr/backend/session.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
-#include "util/signal.h"
static struct wlr_libinput_backend *get_libinput_backend_from_backend(
struct wlr_backend *wlr_backend) {
diff --git a/backend/libinput/events.c b/backend/libinput/events.c
index c5d9c67a..cbbf7537 100644
--- a/backend/libinput/events.c
+++ b/backend/libinput/events.c
@@ -11,7 +11,6 @@
#include <wlr/interfaces/wlr_switch.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
-#include "util/signal.h"
void destroy_libinput_input_device(struct wlr_libinput_input_device *dev) {
if (dev->keyboard.impl) {
@@ -87,7 +86,7 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
libinput_dev, LIBINPUT_DEVICE_CAP_KEYBOARD)) {
init_device_keyboard(dev);
- wlr_signal_emit_safe(&backend->backend.events.new_input,
+ wl_signal_emit_mutable(&backend->backend.events.new_input,
&dev->keyboard.base);
}
@@ -95,35 +94,35 @@ static void handle_device_added(struct wlr_libinput_backend *backend,
libinput_dev, LIBINPUT_DEVICE_CAP_POINTER)) {
init_device_pointer(dev);
- wlr_signal_emit_safe(&backend->backend.events.new_input,
+ wl_signal_emit_mutable(&backend->backend.events.new_input,
&dev->pointer.base);
}
if (libinput_device_has_capability(
libinput_dev, LIBINPUT_DEVICE_CAP_SWITCH)) {
init_device_switch(dev);
- wlr_signal_emit_safe(&backend->backend.events.new_input,
+ wl_signal_emit_mutable(&backend->backend.events.new_input,
&dev->switch_device.base);
}
if (libinput_device_has_capability(
libinput_dev, LIBINPUT_DEVICE_CAP_TOUCH)) {
init_device_touch(dev);
- wlr_signal_emit_safe(&backend->backend.events.new_input,
+ wl_signal_emit_mutable(&backend->backend.events.new_input,
&dev->touch.base);
}
if (libinput_device_has_capability(libinput_dev,
LIBINPUT_DEVICE_CAP_TABLET_TOOL)) {
init_device_tablet(dev);
- wlr_signal_emit_safe(&backend->backend.events.new_input,
+ wl_signal_emit_mutable(&backend->backend.events.new_input,
&dev->tablet.base);
}
if (libinput_device_has_capability(
libinput_dev, LIBINPUT_DEVICE_CAP_TABLET_PAD)) {
init_device_tablet_pad(dev);
- wlr_signal_emit_safe(&backend->backend.events.new_input,
+ wl_signal_emit_mutable(&backend->backend.events.new_input,
&dev->tablet_pad.base);
}
diff --git a/backend/libinput/pointer.c b/backend/libinput/pointer.c
index 841d3dfc..48f8ae12 100644
--- a/backend/libinput/pointer.c
+++ b/backend/libinput/pointer.c
@@ -2,7 +2,6 @@
#include <libinput.h>
#include <wlr/interfaces/wlr_pointer.h>
#include "backend/libinput.h"
-#include "util/signal.h"
const struct wlr_pointer_impl libinput_pointer_impl = {
.name = "libinput-pointer",
@@ -37,8 +36,8 @@ void handle_pointer_motion(struct libinput_event *event,
wlr_event.delta_y = libinput_event_pointer_get_dy(pevent);
wlr_event.unaccel_dx = libinput_event_pointer_get_dx_unaccelerated(pevent);
wlr_event.unaccel_dy = libinput_event_pointer_get_dy_unaccelerated(pevent);
- wlr_signal_emit_safe(&pointer->events.motion, &wlr_event);
- wlr_signal_emit_safe(&pointer->events.frame, pointer);
+ wl_signal_emit_mutable(&pointer->events.motion, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.frame, pointer);
}
void handle_pointer_motion_abs(struct libinput_event *event,
@@ -51,8 +50,8 @@ void handle_pointer_motion_abs(struct libinput_event *event,
usec_to_msec(libinput_event_pointer_get_time_usec(pevent));
wlr_event.x = libinput_event_pointer_get_absolute_x_transformed(pevent, 1);
wlr_event.y = libinput_event_pointer_get_absolute_y_transformed(pevent, 1);
- wlr_signal_emit_safe(&pointer->events.motion_absolute, &wlr_event);
- wlr_signal_emit_safe(&pointer->events.frame, pointer);
+ wl_signal_emit_mutable(&pointer->events.motion_absolute, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.frame, pointer);
}
void handle_pointer_button(struct libinput_event *event,
@@ -72,8 +71,8 @@ void handle_pointer_button(struct libinput_event *event,
wlr_event.state = WLR_BUTTON_RELEASED;
break;
}
- wlr_signal_emit_safe(&pointer->events.button, &wlr_event);
- wlr_signal_emit_safe(&pointer->events.frame, pointer);
+ wl_signal_emit_mutable(&pointer->events.button, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.frame, pointer);
}
void handle_pointer_axis(struct libinput_event *event,
@@ -120,9 +119,9 @@ void handle_pointer_axis(struct libinput_event *event,
wlr_event.delta_discrete =
libinput_event_pointer_get_axis_value_discrete(pevent, axes[i]);
wlr_event.delta_discrete *= WLR_POINTER_AXIS_DISCRETE_STEP;
- wlr_signal_emit_safe(&pointer->events.axis, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.axis, &wlr_event);
}
- wlr_signal_emit_safe(&pointer->events.frame, pointer);
+ wl_signal_emit_mutable(&pointer->events.frame, pointer);
}
#if LIBINPUT_HAS_SCROLL_VALUE120
@@ -158,9 +157,9 @@ void handle_pointer_axis_value120(struct libinput_event *event,
wlr_event.delta_discrete =
libinput_event_pointer_get_scroll_value_v120(pevent, axes[i]);
}
- wlr_signal_emit_safe(&pointer->events.axis, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.axis, &wlr_event);
}
- wlr_signal_emit_safe(&pointer->events.frame, pointer);
+ wl_signal_emit_mutable(&pointer->events.frame, pointer);
}
#endif
@@ -174,7 +173,7 @@ void handle_pointer_swipe_begin(struct libinput_event *event,
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
};
- wlr_signal_emit_safe(&pointer->events.swipe_begin, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.swipe_begin, &wlr_event);
}
void handle_pointer_swipe_update(struct libinput_event *event,
@@ -189,7 +188,7 @@ void handle_pointer_swipe_update(struct libinput_event *event,
.dx = libinput_event_gesture_get_dx(gevent),
.dy = libinput_event_gesture_get_dy(gevent),
};
- wlr_signal_emit_safe(&pointer->events.swipe_update, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.swipe_update, &wlr_event);
}
void handle_pointer_swipe_end(struct libinput_event *event,
@@ -202,7 +201,7 @@ void handle_pointer_swipe_end(struct libinput_event *event,
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.cancelled = libinput_event_gesture_get_cancelled(gevent),
};
- wlr_signal_emit_safe(&pointer->events.swipe_end, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.swipe_end, &wlr_event);
}
void handle_pointer_pinch_begin(struct libinput_event *event,
@@ -215,7 +214,7 @@ void handle_pointer_pinch_begin(struct libinput_event *event,
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
};
- wlr_signal_emit_safe(&pointer->events.pinch_begin, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.pinch_begin, &wlr_event);
}
void handle_pointer_pinch_update(struct libinput_event *event,
@@ -232,7 +231,7 @@ void handle_pointer_pinch_update(struct libinput_event *event,
.scale = libinput_event_gesture_get_scale(gevent),
.rotation = libinput_event_gesture_get_angle_delta(gevent),
};
- wlr_signal_emit_safe(&pointer->events.pinch_update, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.pinch_update, &wlr_event);
}
void handle_pointer_pinch_end(struct libinput_event *event,
@@ -245,7 +244,7 @@ void handle_pointer_pinch_end(struct libinput_event *event,
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.cancelled = libinput_event_gesture_get_cancelled(gevent),
};
- wlr_signal_emit_safe(&pointer->events.pinch_end, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.pinch_end, &wlr_event);
}
void handle_pointer_hold_begin(struct libinput_event *event,
@@ -258,7 +257,7 @@ void handle_pointer_hold_begin(struct libinput_event *event,
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.fingers = libinput_event_gesture_get_finger_count(gevent),
};
- wlr_signal_emit_safe(&pointer->events.hold_begin, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.hold_begin, &wlr_event);
}
void handle_pointer_hold_end(struct libinput_event *event,
@@ -271,5 +270,5 @@ void handle_pointer_hold_end(struct libinput_event *event,
usec_to_msec(libinput_event_gesture_get_time_usec(gevent)),
.cancelled = libinput_event_gesture_get_cancelled(gevent),
};
- wlr_signal_emit_safe(&pointer->events.hold_end, &wlr_event);
+ wl_signal_emit_mutable(&pointer->events.hold_end, &wlr_event);
}
diff --git a/backend/libinput/switch.c b/backend/libinput/switch.c
index 2e89ed59..e8c68bef 100644
--- a/backend/libinput/switch.c
+++ b/backend/libinput/switch.c
@@ -2,7 +2,6 @@
#include <libinput.h>
#include <wlr/interfaces/wlr_switch.h>
#include "backend/libinput.h"
-#include "util/signal.h"
const struct wlr_switch_impl libinput_switch_impl = {
.name = "libinput-switch",
@@ -48,5 +47,5 @@ void handle_switch_toggle(struct libinput_event *event,
}
wlr_event.time_msec =
usec_to_msec(libinput_event_switch_get_time_usec(sevent));
- wlr_signal_emit_safe(&wlr_switch->events.toggle, &wlr_event);
+ wl_signal_emit_mutable(&wlr_switch->events.toggle, &wlr_event);
}
diff --git a/backend/libinput/tablet_pad.c b/backend/libinput/tablet_pad.c
index 083711ef..078f7ca1 100644
--- a/backend/libinput/tablet_pad.c
+++ b/backend/libinput/tablet_pad.c
@@ -6,7 +6,6 @@
#include <wlr/interfaces/wlr_tablet_pad.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
-#include "util/signal.h"
const struct wlr_tablet_pad_impl libinput_tablet_pad_impl = {
.name = "libinput-tablet-pad",
@@ -160,7 +159,7 @@ void handle_tablet_pad_button(struct libinput_event *event,
wlr_event.state = WLR_BUTTON_RELEASED;
break;
}
- wlr_signal_emit_safe(&tablet_pad->events.button, &wlr_event);
+ wl_signal_emit_mutable(&tablet_pad->events.button, &wlr_event);
}
void handle_tablet_pad_ring(struct libinput_event *event,
@@ -181,7 +180,7 @@ void handle_tablet_pad_ring(struct libinput_event *event,
wlr_event.source = WLR_TABLET_PAD_RING_SOURCE_FINGER;
break;
}
- wlr_signal_emit_safe(&tablet_pad->events.ring, &wlr_event);
+ wl_signal_emit_mutable(&tablet_pad->events.ring, &wlr_event);
}
void handle_tablet_pad_strip(struct libinput_event *event,
@@ -202,5 +201,5 @@ void handle_tablet_pad_strip(struct libinput_event *event,
wlr_event.source = WLR_TABLET_PAD_STRIP_SOURCE_FINGER;
break;
}
- wlr_signal_emit_safe(&tablet_pad->events.strip, &wlr_event);
+ wl_signal_emit_mutable(&tablet_pad->events.strip, &wlr_event);
}
diff --git a/backend/libinput/tablet_tool.c b/backend/libinput/tablet_tool.c
index 31cd18b8..d049d16e 100644
--- a/backend/libinput/tablet_tool.c
+++ b/backend/libinput/tablet_tool.c
@@ -6,7 +6,6 @@
#include <wlr/interfaces/wlr_tablet_tool.h>
#include <wlr/util/log.h>
#include "backend/libinput.h"
-#include "util/signal.h"
struct tablet_tool {
struct wlr_tablet_tool wlr_tool;
@@ -36,7 +35,7 @@ void init_device_tablet(struct wlr_libinput_input_device *dev) {
}
static void tool_destroy(struct tablet_tool *tool) {
- wlr_signal_emit_safe(&tool->wlr_tool.events.destroy, &tool->wlr_tool);
+ wl_signal_emit_mutable(&tool->wlr_tool.events.destroy, &tool->wlr_tool);
libinput_tablet_tool_unref(tool->handle);
libinput_tablet_tool_set_user_data(tool->handle, NULL);
wl_list_remove(&tool->link);
@@ -173,7 +172,7 @@ void handle_tablet_tool_axis(struct libinput_event *event,
wlr_event.updated_axes |= WLR_TABLET_TOOL_AXIS_WHEEL;
wlr_event.wheel_delta = libinput_event_tablet_tool_get_wheel_delta(tevent);
}
- wlr_signal_emit_safe(&wlr_tablet->events.axis, &wlr_event);
+ wl_signal_emit_mutable(&wlr_tablet->events.axis, &wlr_event);
}
void handle_tablet_tool_proximity(struct libinput_event *event,
@@ -200,7 +199,7 @@ void handle_tablet_tool_proximity(struct libinput_event *event,
wlr_event.state = WLR_TABLET_TOOL_PROXIMITY_IN;
break;
}
- wlr_signal_emit_safe(&wlr_tablet->events.proximity, &wlr_event);
+ wl_signal_emit_mutable(&wlr_tablet->events.proximity, &wlr_event);
if (libinput_event_tablet_tool_get_proximity_state(tevent) ==
LIBINPUT_TABLET_TOOL_PROXIMITY_STATE_IN) {
@@ -242,7 +241,7 @@ void handle_tablet_tool_tip(struct libinput_event *event,
wlr_event.state = WLR_TABLET_TOOL_TIP_DOWN;
break;
}
- wlr_signal_emit_safe(&wlr_tablet->events.tip, &wlr_event);
+ wl_signal_emit_mutable(&wlr_tablet->events.tip, &wlr_event);
}
void handle_tablet_tool_button(struct libinput_event *event,
@@ -268,5 +267,5 @@ void handle_tablet_tool_button(struct libinput_event *event,
wlr_event.state = WLR_BUTTON_PRESSED;
break;
}
- wlr_signal_emit_safe(&wlr_tablet->events.button, &wlr_event);
+ wl_signal_emit_mutable(&wlr_tablet->events.button, &wlr_event);
}
diff --git a/backend/libinput/touch.c b/backend/libinput/touch.c
index 1475a03e..3316754e 100644
--- a/backend/libinput/touch.c
+++ b/backend/libinput/touch.c
@@ -2,7 +2,6 @@
#include <libinput.h>
#include <wlr/interfaces/wlr_touch.h>
#include "backend/libinput.h"
-#include "util/signal.h"
const struct wlr_touch_impl libinput_touch_impl = {
.name = "libinput-touch",
@@ -39,7 +38,7 @@ void handle_touch_down(struct libinput_event *event,
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
wlr_event.x = libinput_event_touch_get_x_transformed(tevent, 1);
wlr_event.y = libinput_event_touch_get_y_transformed(tevent, 1);
- wlr_signal_emit_safe(&touch->events.down, &wlr_event);
+ wl_signal_emit_mutable(&touch->events.down, &wlr_event);
}
void handle_touch_up(struct libinput_event *event,
@@ -51,7 +50,7 @@ void handle_touch_up(struct libinput_event *event,
wlr_event.time_msec =
usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
- wlr_signal_emit_safe(&touch->events.up, &wlr_event);
+ wl_signal_emit_mutable(&touch->events.up, &wlr_event);
}
void handle_touch_motion(struct libinput_event *event,
@@ -65,7 +64,7 @@ void handle_touch_motion(struct libinput_event *event,
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
wlr_event.x = libinput_event_touch_get_x_transformed(tevent, 1);
wlr_event.y = libinput_event_touch_get_y_transformed(tevent, 1);
- wlr_signal_emit_safe(&touch->events.motion, &wlr_event);
+ wl_signal_emit_mutable(&touch->events.motion, &wlr_event);
}
void handle_touch_cancel(struct libinput_event *event,
@@ -77,10 +76,10 @@ void handle_touch_cancel(struct libinput_event *event,
wlr_event.time_msec =
usec_to_msec(libinput_event_touch_get_time_usec(tevent));
wlr_event.touch_id = libinput_event_touch_get_seat_slot(tevent);
- wlr_signal_emit_safe(&touch->events.cancel, &wlr_event);
+ wl_signal_emit_mutable(&touch->events.cancel, &wlr_event);
}
void handle_touch_frame(struct libinput_event *event,
struct wlr_touch *touch) {
- wlr_signal_emit_safe(&touch->events.frame, NULL);
+ wl_signal_emit_mutable(&touch->events.frame, NULL);
}
diff --git a/backend/multi/backend.c b/backend/multi/backend.c
index b06bc486..f392db31 100644
--- a/backend/multi/backend.c
+++ b/backend/multi/backend.c
@@ -9,7 +9,6 @@
#include <wlr/util/log.h>
#include "backend/backend.h"
#include "backend/multi.h"
-#include "util/signal.h"
struct subbackend_state {
struct wlr_backend *backend;
@@ -161,13 +160,13 @@ bool wlr_backend_is_multi(struct wlr_backend *b) {
static void new_input_reemit(struct wl_listener *listener, void *data) {
struct subbackend_state *state = wl_container_of(listener,
state, new_input);
- wlr_signal_emit_safe(&state->container->events.new_input, data);
+ wl_signal_emit_mutable(&state->container->events.new_input, data);
}
static void new_output_reemit(struct wl_listener *listener, void *data) {
struct subbackend_state *state = wl_container_of(listener,
state, new_output);
- wlr_signal_emit_safe(&state->container->events.new_output, data);
+ wl_signal_emit_mutable(&state->container->events.new_output, data);
}
static void handle_subbackend_destroy(struct wl_listener *listener,
@@ -218,7 +217,7 @@ bool wlr_multi_backend_add(struct wlr_backend *_multi,
wl_signal_add(&backend->events.new_output, &sub->new_output);
sub->new_output.notify = new_output_reemit;
- wlr_signal_emit_safe(&multi->events.backend_add, backend);
+ wl_signal_emit_mutable(&multi->events.backend_add, backend);
return true;
}
@@ -230,7 +229,7 @@ void wlr_multi_backend_remove(struct wlr_backend *_multi,
multi_backend_get_subbackend(multi, backend);
if (sub) {
- wlr_signal_emit_safe(&multi->events.backend_remove, backend);
+ wl_signal_emit_mutable(&multi->events.backend_remove, backend);
subbackend_state_destroy(sub);
}
}
diff --git a/backend/session/session.c b/backend/session/session.c
index 7d6d080d..fcd25fec 100644
--- a/backend/session/session.c
+++ b/backend/session/session.c
@@ -17,7 +17,6 @@
#include <xf86drm.h>
#include <xf86drmMode.h>
#include "backend/session/session.h"
-#include "util/signal.h"
#include <libseat.h>
@@ -26,13 +25,13 @@
static void handle_enable_seat(struct libseat *seat, void *data) {
struct wlr_session *session = data;
session->active = true;
- wlr_signal_emit_safe(&session->events.active, NULL);
+ wl_signal_emit_mutable(&session->events.active, NULL);
}
static void handle_disable_seat(struct libseat *seat, void *data) {
struct wlr_session *session = data;
session->active = false;
- wlr_signal_emit_safe(&session->events.active, NULL);
+ wl_signal_emit_mutable(&session->events.active, NULL);
libseat_disable_seat(session->seat_handle);
}
@@ -198,7 +197,7 @@ static int handle_udev_event(int fd, uint32_t mask, void *data) {
struct wlr_session_add_event event = {
.path = devnode,
};
- wlr_signal_emit_safe(&session->events.add_drm_card, &event);
+ wl_signal_emit_mutable(&session->events.add_drm_card, &event);
} else if (strcmp(action, "change") == 0 || strcmp(action, "remove") == 0) {
dev_t devnum = udev_device_get_devnum(udev_dev);
struct wlr_device *dev;
@@ -211,10 +210,10 @@ static int handle_udev_event(int fd, uint32_t mask, void *data) {
wlr_log(WLR_DEBUG, "DRM device %s changed", sysname);
struct wlr_device_change_event event = {0};
read_udev_change_event(&event, udev_dev);
- wlr_signal_emit_safe(&dev->events.change, &event);
+ wl_signal_emit_mutable(&dev->events.change, &event);
} else if (strcmp(action, "remove") == 0) {
wlr_log(WLR_DEBUG, "DRM device %s removed", sysname);
- wlr_signal_emit_safe(&dev->events.remove, NULL);
+ wl_signal_emit_mutable(&dev->events.remove, NULL);
} else {
assert(0);
}
@@ -298,7 +297,7 @@ void wlr_session_destroy(struct wlr_session *session) {
return;
}
- wlr_signal_emit_safe(&session->events.destroy, session);
+ wl_signal_emit_mutable(&session->events.destroy, session);
wl_list_remove(&session->display_destroy.link);
wl_event_source_remove(session->udev_event);
diff --git a/backend/wayland/backend.c b/backend/wayland/backend.c
index 2980324f..9cf4ed5e 100644
--- a/backend/wayland/backend.c
+++ b/backend/wayland/backend.c
@@ -19,7 +19,6 @@
#include "backend/wayland.h"
#include "render/drm_format_set.h"
#include "render/pixel_format.h"
-#include "util/signal.h"
#include "drm-client-protocol.h"
#include "linux-dmabuf-unstable-v1-client-protocol.h"
diff --git a/backend/wayland/output.c b/backend/wayland/output.c
index baa25bc3..36b3911b 100644
--- a/backend/wayland/output.c
+++ b/backend/wayland/output.c
@@ -19,7 +19,6 @@
#include "render/pixel_format.h"
#include "render/swapchain.h"
#include "render/wlr_renderer.h"
-#include "util/signal.h"
#include "linux-dmabuf-unstable-v1-client-protocol.h"
#include "presentation-time-client-protocol.h"
@@ -579,7 +578,7 @@ struct wlr_output *wlr_wl_output_create(struct wlr_backend *wlr_backend) {
wl_list_insert(&backend->outputs, &output->link);
wlr_output_update_enabled(wlr_output, true);
- wlr_signal_emit_safe(&backend->backend.events.new_output, wlr_output);
+ wl_signal_emit_mutable(&backend->backend.events.new_output, wlr_output);
struct wlr_wl_seat *seat;
wl_list_for_each(seat, &backend->seats, link) {
diff --git a/backend/wayland/pointer.c b/backend/wayland/pointer.c
index b2f85459..4ce233e5 100644
--- a/backend/wayland/pointer.c
+++ b/backend/wayland/pointer.c
@@ -7,7 +7,6 @@
#include <wlr/util/log.h>
#include "backend/wayland.h"
-#include "util/signal.h"
#include "pointer-gestures-unstable-v1-client-protocol.h"
#include "relative-pointer-unstable-v1-client-protocol.h"
@@ -94,7 +93,7 @@ static void pointer_handle_motion(void *data, struct wl_pointer *wl_pointer,
.x = wl_fixed_to_double(sx) / wlr_output->width,
.y = wl_fixed_to_double(sy) / wlr_output->height,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.motion_absolute, &event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.motion_absolute, &event);
}
static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
@@ -111,7 +110,7 @@ static void pointer_handle_button(void *data, struct wl_pointer *wl_pointer,
.state = state,
.time_msec = time,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.button, &event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.button, &event);
}
static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
@@ -130,7 +129,7 @@ static void pointer_handle_axis(void *data, struct wl_pointer *wl_pointer,
.time_msec = time,
.source = pointer->axis_source,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.axis, &event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.axis, &event);
pointer->axis_discrete = 0;
}
@@ -142,7 +141,7 @@ static void pointer_handle_frame(void *data, struct wl_pointer *wl_pointer) {
return;
}
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.frame,
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.frame,
&pointer->wlr_pointer);
}
@@ -173,7 +172,7 @@ static void pointer_handle_axis_stop(void *data, struct wl_pointer *wl_pointer,
.time_msec = time,
.source = pointer->axis_source,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.axis, &event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.axis, &event);
}
static void pointer_handle_axis_discrete(void *data,
@@ -228,7 +227,7 @@ static void gesture_swipe_begin(void *data,
.time_msec = time,
.fingers = fingers,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.swipe_begin, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.swipe_begin, &wlr_event);
}
static void gesture_swipe_update(void *data,
@@ -247,7 +246,7 @@ static void gesture_swipe_update(void *data,
.dx = wl_fixed_to_double(dx),
.dy = wl_fixed_to_double(dy),
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.swipe_update, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.swipe_update, &wlr_event);
}
static void gesture_swipe_end(void *data,
@@ -264,7 +263,7 @@ static void gesture_swipe_end(void *data,
.time_msec = time,
.cancelled = cancelled,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.swipe_end, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.swipe_end, &wlr_event);
}
static const struct zwp_pointer_gesture_swipe_v1_listener gesture_swipe_impl = {
@@ -291,7 +290,7 @@ static void gesture_pinch_begin(void *data,
.fingers = pointer->fingers,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.pinch_begin, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.pinch_begin, &wlr_event);
}
static void gesture_pinch_update(void *data,
@@ -313,7 +312,7 @@ static void gesture_pinch_update(void *data,
.scale = wl_fixed_to_double(scale),
.rotation = wl_fixed_to_double(rotation),
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.pinch_update, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.pinch_update, &wlr_event);
}
static void gesture_pinch_end(void *data,
@@ -330,7 +329,7 @@ static void gesture_pinch_end(void *data,
.time_msec = time,
.cancelled = cancelled,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.pinch_end, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.pinch_end, &wlr_event);
}
static const struct zwp_pointer_gesture_pinch_v1_listener gesture_pinch_impl = {
@@ -356,7 +355,7 @@ static void gesture_hold_begin(void *data,
.time_msec = time,
.fingers = fingers,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.hold_begin, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.hold_begin, &wlr_event);
}
static void gesture_hold_end(void *data,
@@ -373,7 +372,7 @@ static void gesture_hold_end(void *data,
.time_msec = time,
.cancelled = cancelled,
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.hold_end, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.hold_end, &wlr_event);
}
static const struct zwp_pointer_gesture_hold_v1_listener gesture_hold_impl = {
@@ -401,7 +400,7 @@ static void relative_pointer_handle_relative_motion(void *data,
.unaccel_dx = wl_fixed_to_double(dx_unaccel),
.unaccel_dy = wl_fixed_to_double(dy_unaccel),
};
- wlr_signal_emit_safe(&pointer->wlr_pointer.events.motion, &wlr_event);
+ wl_signal_emit_mutable(&pointer->wlr_pointer.events.motion, &wlr_event);
}
static const struct zwp_relative_pointer_v1_listener relative_pointer_listener = {
@@ -463,7 +462,7 @@ void create_pointer(struct wlr_wl_seat *seat, struct wlr_wl_output *output) {
wl_signal_add(&output->wlr_output.events.destroy, &pointer->output_destroy);
pointer->output_destroy.notify = pointer_output_destroy;
- wlr_signal_emit_safe(&seat->backend->backend.events.new_input,
+ wl_signal_emit_mutable(&seat->backend->backend.events.new_input,
&pointer->wlr_pointer.base);
wl_list_insert(&seat->pointers, &pointer->link);
diff --git a/backend/wayland/seat.c b/backend/wayland/seat.c
index 655f9dad..b81fe219 100644
--- a/backend/wayland/seat.c
+++ b/backend/wayland/seat.c
@@ -18,7 +18,6 @@
#include <wlr/util/log.h>
#include "backend/wayland.h"
-#include "util/signal.h"
#include "util/time.h"
static void keyboard_handle_keymap(void *data, struct wl_keyboard *wl_keyboard,
@@ -113,7 +112,7 @@ void init_seat_keyboard(struct wlr_wl_seat *seat) {
wl_keyboard_add_listener(seat->wl_keyboard, &keyboard_listener,
&seat->wlr_keyboard);
- wlr_signal_emit_safe(&seat->backend->backend.events.new_input,
+ wl_signal_emit_mutable(&seat->backend->backend.events.new_input,
&seat->wlr_keyboard.base);
}
@@ -148,7 +147,7 @@ static void touch_handle_down(void *data, struct wl_touch *wl_touch,
.touch_id = id,
};
touch_coordinates_to_absolute(seat, x, y, &event.x, &event.y);
- wlr_signal_emit_safe(&touch->events.down, &event);
+ wl_signal_emit_mutable(&touch->events.down, &event);
}
static void touch_handle_up(void *data, struct wl_touch *wl_touch,
@@ -161,7 +160,7 @@ static void touch_handle_up(void *data, struct wl_touch *wl_touch,
.time_msec = time,
.touch_id = id,
};
- wlr_signal_emit_safe(&touch->events.up, &event);
+ wl_signal_emit_mutable(&touch->events.up, &event);
}
static void touch_handle_motion(void *data, struct wl_touch *wl_touch,
@@ -176,12 +175,12 @@ static void touch_handle_motion(void *data, struct wl_touch *wl_touch,
};
touch_coordinates_to_absolute(seat, x, y, &event.x, &event.y);
- wlr_signal_emit_safe(&touch->events.motion, &event);
+ wl_signal_emit_mutable(&touch->events.motion, &event);
}
static void touch_handle_frame(void *data, struct wl_touch *wl_touch) {
struct wlr_wl_seat *seat = data;
- wlr_signal_emit_safe(&seat->wlr_touch.events.frame, NULL);
+ wl_signal_emit_mutable(&seat->wlr_touch.events.frame, NULL);
}
static void touch_handle_cancel(void *data, struct wl_touch *wl_touch) {
@@ -228,7 +227,7 @@ void init_seat_touch(struct wlr_wl_seat *seat) {
}
wl_touch_add_listener(seat->wl_touch, &touch_listener, seat);
- wlr_signal_emit_safe(&seat->backend->backend.events.new_input,
+ wl_signal_emit_mutable(&seat->backend->backend.events.new_input,
&seat->wlr_touch.base);
}
diff --git a/backend/wayland/tablet_v2.c b/backend/wayland/tablet_v2.c
index bedaabf2..d1aeecd2 100644
--- a/backend/wayland/tablet_v2.c
+++ b/backend/wayland/tablet_v2.c
@@ -9,7 +9,6 @@
#include <wlr/util/log.h>
#include "backend/wayland.h"
-#include "util/signal.h"
#include "util/time.h"
#include "tablet-unstable-v2-client-protocol.h"
@@ -108,11 +107,11 @@ static void handle_tablet_pad_ring_frame(void *data,
};
if (ring->angle >= 0) {
- wlr_signal_emit_safe(&ring->group->pad->events.ring, &evt);
+ wl_signal_emit_mutable(&ring->group->pad->events.ring, &evt);
}
if (ring->stopped) {
evt.position = -1;
- wlr_signal_emit_safe(&ring->group->pad->events.ring, &evt);
+ wl_signal_emit_mutable(&ring->group->pad->events.ring, &evt);
}
ring->angle = -1;
@@ -161,11 +160,11 @@ static void handle_tablet_pad_strip_frame(void *data,
};
if (strip->position >= 0) {
- wlr_signal_emit_safe(&strip->group->pad->events.strip, &evt);
+ wl_signal_emit_mutable(&strip->group->pad->events.strip, &evt);
}
if (strip->stopped) {
evt.position = -1;
- wlr_signal_emit_safe(&strip->group->pad->events.strip, &evt);
+ wl_signal_emit_mutable(&strip->group->pad->events.strip, &evt);
}
strip->position = -1;
@@ -345,13 +344,13 @@ static void handle_tablet_pad_button(void *data,
.group = 0,
};
- wlr_signal_emit_safe(&seat->wlr_tablet_pad.events.button, &evt);
+ wl_signal_emit_mutable(&seat->wlr_tablet_pad.events.button, &evt);
}
static void handle_tablet_pad_done(void *data,
struct zwp_tablet_pad_v2 *zwp_tablet_pad_v2) {
struct wlr_wl_seat *seat = data;
- wlr_signal_emit_safe(&seat->backend->backend.events.new_input,
+ wl_signal_emit_mutable(&seat->backend->backend.events.new_input,
&seat->wlr_tablet_pad.base);
}
@@ -362,7 +361,7 @@ static void handle_tablet_pad_enter(void *data,
struct wlr_wl_seat *seat = data;
assert(seat->zwp_tablet_v2 == tablet_p);
- wlr_signal_emit_safe(&seat->wlr_tablet_pad.events.attach_tablet,
+ wl_signal_emit_mutable(&seat->wlr_tablet_pad.events.attach_tablet,
&seat->wlr_tablet_tool);
}
@@ -591,7 +590,7 @@ static void handle_tablet_tool_button(void *data,
WLR_BUTTON_RELEASED : WLR_BUTTON_PRESSED,
};
- wlr_signal_emit_safe(&tablet->events.button, &evt);
+ wl_signal_emit_mutable(&tablet->events.button, &evt);
}
static void clear_tablet_tool_values(struct tablet_tool *tool) {
@@ -629,7 +628,7 @@ static void handle_tablet_tool_frame(void *data,
.state = WLR_TABLET_TOOL_PROXIMITY_IN,
};
- wlr_signal_emit_safe(&tablet->events.proximity, &evt);
+ wl_signal_emit_mutable(&tablet->events.proximity, &evt);
}
{
@@ -686,7 +685,7 @@ static void handle_tablet_tool_frame(void *data,
}
if (evt.updated_axes) {
- wlr_signal_emit_safe(&tablet->events.axis, &evt);
+ wl_signal_emit_mutable(&tablet->events.axis, &evt);
}
}
@@ -705,7 +704,7 @@ static void handle_tablet_tool_frame(void *data,
.state = WLR_TABLET_TOOL_TIP_DOWN,
};
- wlr_signal_emit_safe(&tablet->events.tip, &evt);
+ wl_signal_emit_mutable(&tablet->events.tip, &evt);
}
if (tool->is_up) {
@@ -718,7 +717,7 @@ static void handle_tablet_tool_frame(void *data,
.state = WLR_TABLET_TOOL_TIP_UP,
};
- wlr_signal_emit_safe(&tablet->events.tip, &evt);
+ wl_signal_emit_mutable(&tablet->events.tip, &evt);
}
if (tool->is_out) {
@@ -731,7 +730,7 @@ static void handle_tablet_tool_frame(void *data,
.state = WLR_TABLET_TOOL_PROXIMITY_OUT,
};
- wlr_signal_emit_safe(&tablet->events.proximity, &evt);
+ wl_signal_emit_mutable(&tablet->events.proximity, &evt);
}
clear_values:
@@ -829,7 +828,7 @@ static void handle_tablet_path(void *data, struct zwp_tablet_v2 *zwp_tablet_v2,
static void handle_tablet_done(void *data, struct zwp_tablet_v2 *zwp_tablet_v2) {
struct wlr_wl_seat *seat = data;
- wlr_signal_emit_safe(&seat->backend->backend.events.new_input,
+ wl_signal_emit_mutable(&seat->backend->backend.events.new_input,
&seat->wlr_tablet.base);
}
diff --git a/backend/x11/backend.c b/backend/x11/backend.c
index dbbd74e8..1bb94410 100644
--- a/backend/x11/backend.c
+++ b/backend/x11/backend.c
@@ -30,7 +30,6 @@
#include "backend/x11.h"
#include "render/drm_format_set.h"
-#include "util/signal.h"
// See dri2_format_for_depth in mesa
const struct wlr_x11_format formats[] = {
@@ -164,7 +163,7 @@ static bool backend_start(struct wlr_backend *backend) {
wlr_log(WLR_INFO, "Starting X11 backend");
- wlr_signal_emit_safe(&x11->backend.events.new_input, &x11->keyboard.base);
+ wl_signal_emit_mutable(&x11->backend.events.new_input, &x11->keyboard.base);
for (size_t i = 0; i < x11->requested_outputs; ++i) {
wlr_x11_output_create(&x11->backend);
diff --git a/backend/x11/input_device.c b/backend/x11/input_device.c
index 41168222..603316f1 100644
--- a/backend/x11/input_device.c
+++ b/backend/x11/input_device.c
@@ -16,7 +16,6 @@
#include <wlr/util/log.h>
#include "backend/x11.h"
-#include "util/signal.h"
static void send_key_event(struct wlr_x11_backend *x11, uint32_t key,
enum wl_keyboard_key_state st, xcb_timestamp_t time) {
@@ -37,8 +36,8 @@ static void send_button_event(struct wlr_x11_output *output, uint32_t key,
.button = key,
.state = st,
};
- wlr_signal_emit_safe(&output->pointer.events.button, &ev);
- wlr_signal_emit_safe(&output->pointer.events.frame, &output->pointer);
+ wl_signal_emit_mutable(&output->pointer.events.button, &ev);
+ wl_signal_emit_mutable(&output->pointer.events.frame, &output->pointer);
}
static void send_axis_event(struct wlr_x11_output *output, int32_t delta,
@@ -52,8 +51,8 @@ static void send_axis_event(struct wlr_x11_output *output, int32_t delta,
.delta = delta * 15,
.delta_discrete = delta,
};
- wlr_signal_emit_safe(&output->pointer.events.axis, &ev);
- wlr_signal_emit_safe(&output->pointer.events.frame, &output->pointer);
+ wl_signal_emit_mutable(&output->pointer.events.axis, &ev);
+ wl_signal_emit_mutable(&output->pointer.events.frame, &output->pointer);
}
static void send_pointer_position_event(struct wlr_x11_output *output,
@@ -64,8 +63,8 @@ static void send_pointer_position_event(struct wlr_x11_output *output,
.x = (double)x / output->wlr_output.width,
.y = (double)y / output->wlr_output.height,
};
- wlr_signal_emit_safe(&output->pointer.events.motion_absolute, &ev);
- wlr_signal_emit_safe(&output->pointer.events.frame, &output->pointer);
+ wl_signal_emit_mutable(&output->pointer.events.motion_absolute, &ev);
+ wl_signal_emit_mutable(&output->pointer.events.frame, &output->pointer);
}
static void send_touch_down_event(struct wlr_x11_output *output,
@@ -77,8 +76,8 @@ static void send_touch_down_event(struct wlr_x11_output *output,
.y = (double)y / output->wlr_output.height,
.touch_id = touch_id,
};
- wlr_signal_emit_safe(&output->touch.events.down, &ev);
- wlr_signal_emit_safe(&output->touch.events.frame, NULL);
+ wl_signal_emit_mutable(&output->touch.events.down, &ev);
+ wl_signal_emit_mutable(&output->touch.events.frame, NULL);
}
static void send_touch_motion_event(struct wlr_x11_output *output,
@@ -90,8 +89,8 @@ static void send_touch_motion_event(struct wlr_x11_output *output,
.y = (double)y / output->wlr_output.height,
.touch_id = touch_id,
};
- wlr_signal_emit_safe(&output->touch.events.motion, &ev);
- wlr_signal_emit_safe(&output->touch.events.frame, NULL);
+ wl_signal_emit_mutable(&output->touch.events.motion, &ev);
+ wl_signal_emit_mutable(&output->touch.events.frame, NULL);
}
static void send_touch_up_event(struct wlr_x11_output *output,
@@ -101,8 +100,8 @@ static void send_touch_up_event(struct wlr_x11_output *output,
.time_msec = time,
.touch_id = touch_id,
};
- wlr_signal_emit_safe(&output->touch.events.up, &ev);
- wlr_signal_emit_safe(&output->touch.events.frame, NULL);
+ wl_signal_emit_mutable(&output->touch.events.up, &ev);
+ wl_signal_emit_mutable(&output->touch.events.frame, NULL);
}
static struct wlr_x11_touchpoint *get_touchpoint_from_x11_touch_id(
diff --git a/backend/x11/output.c b/backend/x11/output.c
index 3a599023..f56129ab 100644
--- a/backend/x11/output.c
+++ b/backend/x11/output.c
@@ -21,7 +21,6 @@
#include <wlr/util/log.h>
#include "backend/x11.h"
-#include "util/signal.h"
#include "util/time.h"
static const uint32_t SUPPORTED_OUTPUT_STATE =
@@ -590,9 +589,9 @@ struct wlr_output *wlr_x11_output_create(struct wlr_backend *backend) {
output->touch.output_name = strdup(wlr_output->name);
wl_list_init(&output->touchpoints);
- wlr_signal_emit_safe(&x11->backend.events.new_output, wlr_output);
- wlr_signal_emit_safe(&x11->backend.events.new_input, &output->pointer.base);
- wlr_signal_emit_safe(&x11->backend.events.new_input, &output->touch.base);
+ wl_signal_emit_mutable(&x11->backend.events.new_output, wlr_output);
+ wl_signal_emit_mutable(&x11->backend.events.new_input, &output->pointer.base);
+ wl_signal_emit_mutable(&x11->backend.events.new_input, &output->touch.base);
// Start the rendering loop by requesting the compositor to render a frame
wlr_output_schedule_frame(wlr_output);
diff --git a/render/allocator/allocator.c b/render/allocator/allocator.c
index 00dadd29..b380584c 100644
--- a/render/allocator/allocator.c
+++ b/render/allocator/allocator.c
@@ -14,7 +14,6 @@
#include "render/allocator/drm_dumb.h"
#include "render/allocator/shm.h"
#include "render/wlr_renderer.h"
-#include "util/signal.h"
#if WLR_HAS_GBM_ALLOCATOR
#include "render/allocator/gbm.h"
@@ -159,7 +158,7 @@ void wlr_allocator_destroy(struct wlr_allocator *alloc) {
if (alloc == NULL) {
return;
}
- wlr_signal_emit_safe(&alloc->events.destroy, NULL);
+ wl_signal_emit_mutable(&alloc->events.destroy, NULL);
alloc->impl->destroy(alloc);
}
diff --git a/render/gles2/texture.c b/render/gles2/texture.c
index 8b4ce673..776baf40 100644
--- a/render/gles2/texture.c
+++ b/render/gles2/texture.c
@@ -15,7 +15,6 @@
#include "render/gles2.h"
#include "render/pixel_format.h"
#include "types/wlr_buffer.h"
-#include "util/signal.h"
static const struct wlr_texture_impl texture_impl;
diff --git a/render/wlr_renderer.c b/render/wlr_renderer.c
index 478db745..622f5f96 100644
--- a/render/wlr_renderer.c
+++ b/render/wlr_renderer.c
@@ -26,7 +26,6 @@
#endif // WLR_HAS_VULKAN_RENDERER
#include "backend/backend.h"
-#include "util/signal.h"
#include "render/pixel_format.h"
#include "render/wlr_renderer.h"
@@ -53,7 +52,7 @@ void wlr_renderer_destroy(struct wlr_renderer *r) {
assert(!r->rendering);
- wlr_signal_emit_safe(&r->events.destroy, r);
+ wl_signal_emit_mutable(&r->events.destroy, r);
if (r->impl && r->impl->destroy) {
r->impl->destroy(r);
diff --git a/types/data_device/wlr_data_device.c b/types/data_device/wlr_data_device.c
index ceaf80e7..7e674790 100644
--- a/types/data_device/wlr_data_device.c
+++ b/types/data_device/wlr_data_device.c
@@ -9,7 +9,6 @@
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
#include "types/wlr_data_device.h"
-#include "util/signal.h"
#define DATA_DEVICE_MANAGER_VERSION 3
@@ -162,7 +161,7 @@ void wlr_seat_request_set_selection(struct wlr_seat *seat,
.source = source,
.serial = serial,
};
- wlr_signal_emit_safe(&seat->events.request_set_selection, &event);
+ wl_signal_emit_mutable(&seat->events.request_set_selection, &event);
}
static void seat_handle_selection_source_destroy(
@@ -179,7 +178,7 @@ static void seat_handle_selection_source_destroy(
seat_client_send_selection(focused_client);
}
- wlr_signal_emit_safe(&seat->events.set_selection, seat);
+ wl_signal_emit_mutable(&seat->events.set_selection, seat);
}
void wlr_seat_set_selection(struct wlr_seat *seat,
@@ -211,7 +210,7 @@ void wlr_seat_set_selection(struct wlr_seat *seat,
seat_client_send_selection(focused_client);
}
- wlr_signal_emit_safe(&seat->events.set_selection, seat);
+ wl_signal_emit_mutable(&seat->events.set_selection, seat);
}
@@ -280,7 +279,7 @@ static void data_device_manager_bind(struct wl_client *client,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_data_device_manager *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/data_device/wlr_data_offer.c b/types/data_device/wlr_data_offer.c
index ce28c6d6..67552b47 100644
--- a/types/data_device/wlr_data_offer.c
+++ b/types/data_device/wlr_data_offer.c
@@ -8,7 +8,6 @@
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
#include "types/wlr_data_device.h"
-#include "util/signal.h"
static const struct wl_data_offer_interface data_offer_impl;
diff --git a/types/data_device/wlr_data_source.c b/types/data_device/wlr_data_source.c
index b07c4487..dc9725fb 100644
--- a/types/data_device/wlr_data_source.c
+++ b/types/data_device/wlr_data_source.c
@@ -9,7 +9,6 @@
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
#include "types/wlr_data_device.h"
-#include "util/signal.h"
void wlr_data_source_init(struct wlr_data_source *source,
const struct wlr_data_source_impl *impl) {
@@ -40,7 +39,7 @@ void wlr_data_source_destroy(struct wlr_data_source *source) {
return;
}
- wlr_signal_emit_safe(&source->events.destroy, source);
+ wl_signal_emit_mutable(&source->events.destroy, source);
char **p;
wl_array_for_each(p, &source->mime_types) {
diff --git a/types/data_device/wlr_drag.c b/types/data_device/wlr_drag.c
index 0843870d..9b48df32 100644
--- a/types/data_device/wlr_drag.c
+++ b/types/data_device/wlr_drag.c
@@ -9,7 +9,6 @@
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
#include "types/wlr_data_device.h"
-#include "util/signal.h"
static void drag_handle_seat_client_destroy(struct wl_listener *listener,
void *data) {
@@ -104,16 +103,16 @@ static void drag_set_focus(struct wlr_drag *drag,
wl_signal_add(&focus_client->events.destroy, &drag->seat_client_destroy);
out:
- wlr_signal_emit_safe(&drag->events.focus, drag);
+ wl_signal_emit_mutable(&drag->events.focus, drag);
}
static void drag_icon_set_mapped(struct wlr_drag_icon *icon, bool mapped) {
if (mapped && !icon->mapped) {
icon->mapped = true;
- wlr_signal_emit_safe(&icon->events.map, icon);
+ wl_signal_emit_mutable(&icon->events.map, icon);
} else if (!mapped && icon->mapped) {
icon->mapped = false;
- wlr_signal_emit_safe(&icon->events.unmap, icon);
+ wl_signal_emit_mutable(&icon->events.unmap, icon);
}
}
@@ -151,7 +150,7 @@ static void drag_destroy(struct wlr_drag *drag) {
// to ensure that the wl_data_device.leave is sent before emitting the
// signal. This allows e.g. wl_pointer.enter to be sent in the destroy
// signal handler.
- wlr_signal_emit_safe(&drag->events.destroy, drag);
+ wl_signal_emit_mutable(&drag->events.destroy, drag);
if (drag->source) {
wl_list_remove(&drag->source_destroy.link);
@@ -188,7 +187,7 @@ static void drag_handle_pointer_motion(struct wlr_seat_pointer_grab *grab,
.sx = sx,
.sy = sy,
};
- wlr_signal_emit_safe(&drag->events.motion, &event);
+ wl_signal_emit_mutable(&drag->events.motion, &event);
}
}
@@ -209,7 +208,7 @@ static void drag_drop(struct wlr_drag *drag, uint32_t time) {
.drag = drag,
.time = time,
};
- wlr_signal_emit_safe(&drag->events.drop, &event);
+ wl_signal_emit_mutable(&drag->events.drop, &event);
}
static uint32_t drag_handle_pointer_button(struct wlr_seat_pointer_grab *grab,
@@ -364,7 +363,7 @@ static void drag_icon_destroy(struct wlr_drag_icon *icon) {
return;
}
drag_icon_set_mapped(icon, false);
- wlr_signal_emit_safe(&icon->events.destroy, icon);
+ wl_signal_emit_mutable(&icon->events.destroy, icon);
icon->surface->role_data = NULL;
wl_list_remove(&icon->surface_destroy.link);
free(icon);
@@ -480,7 +479,7 @@ void wlr_seat_request_start_drag(struct wlr_seat *seat, struct wlr_drag *drag,
.origin = origin,
.serial = serial,
};
- wlr_signal_emit_safe(&seat->events.request_start_drag, &event);
+ wl_signal_emit_mutable(&seat->events.request_start_drag, &event);
}
static void seat_handle_drag_source_destroy(struct wl_listener *listener,
@@ -511,7 +510,7 @@ void wlr_seat_start_drag(struct wlr_seat *seat, struct wlr_drag *drag,
wl_signal_add(&drag->source->events.destroy, &seat->drag_source_destroy);
}
- wlr_signal_emit_safe(&seat->events.start_drag, drag);
+ wl_signal_emit_mutable(&seat->events.start_drag, drag);
}
void wlr_seat_start_pointer_drag(struct wlr_seat *seat, struct wlr_drag *drag,
diff --git a/types/output/cursor.c b/types/output/cursor.c
index 85973ce9..89f41b77 100644
--- a/types/output/cursor.c
+++ b/types/output/cursor.c
@@ -10,7 +10,6 @@
#include "render/swapchain.h"
#include "types/wlr_buffer.h"
#include "types/wlr_output.h"
-#include "util/signal.h"
static bool output_set_hardware_cursor(struct wlr_output *output,
struct wlr_buffer *buffer, int hotspot_x, int hotspot_y) {
@@ -168,7 +167,7 @@ static void output_cursor_damage_whole(struct wlr_output_cursor *cursor) {
.output = cursor->output,
.damage = &damage,
};
- wlr_signal_emit_safe(&cursor->output->events.damage, &event);
+ wl_signal_emit_mutable(&cursor->output->events.damage, &event);
pixman_region32_fini(&damage);
}
diff --git a/types/output/output.c b/types/output/output.c
index b45576fa..549dabd1 100644
--- a/types/output/output.c
+++ b/types/output/output.c
@@ -11,7 +11,6 @@
#include "render/swapchain.h"
#include "types/wlr_output.h"
#include "util/global.h"
-#include "util/signal.h"
#define OUTPUT_VERSION 4
@@ -124,7 +123,7 @@ static void output_bind(struct wl_client *wl_client, void *data,
.resource = resource,
};
- wlr_signal_emit_safe(&output->events.bind, &evt);
+ wl_signal_emit_mutable(&output->events.bind, &evt);
}
void wlr_output_create_global(struct wlr_output *output) {
@@ -187,7 +186,7 @@ void wlr_output_update_enabled(struct wlr_output *output, bool enabled) {
}
output->enabled = enabled;
- wlr_signal_emit_safe(&output->events.enable, output);
+ wl_signal_emit_mutable(&output->events.enable, output);
}
static void output_update_matrix(struct wlr_output *output) {
@@ -255,7 +254,7 @@ void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
}
wlr_output_schedule_done(output);
- wlr_signal_emit_safe(&output->events.mode, output);
+ wl_signal_emit_mutable(&output->events.mode, output);
}
void wlr_output_set_transform(struct wlr_output *output,
@@ -306,7 +305,7 @@ void wlr_output_set_description(struct wlr_output *output, const char *desc) {
}
wlr_output_schedule_done(output);
- wlr_signal_emit_safe(&output->events.description, output);
+ wl_signal_emit_mutable(&output->events.description, output);
}
static void handle_display_destroy(struct wl_listener *listener, void *data) {
@@ -389,7 +388,7 @@ void wlr_output_destroy(struct wlr_output *output) {
wlr_output_destroy_global(output);
output_clear_back_buffer(output);
- wlr_signal_emit_safe(&output->events.destroy, output);
+ wl_signal_emit_mutable(&output->events.destroy, output);
wlr_addon_set_finish(&output->addons);
// The backend is responsible for free-ing the list of modes
@@ -747,7 +746,7 @@ bool wlr_output_commit_state(struct wlr_output *output,
.when = &now,
.state = &pending,
};
- wlr_signal_emit_safe(&output->events.precommit, &pre_event);
+ wl_signal_emit_mutable(&output->events.precommit, &pre_event);
// output_clear_back_buffer detaches the buffer from the renderer. This is
// important to do before calling impl->commit(), because this marks an
@@ -837,7 +836,7 @@ bool wlr_output_commit_state(struct wlr_output *output,
.when = &now,
.buffer = (pending.committed & WLR_OUTPUT_STATE_BUFFER) ? pending.buffer : NULL,
};
- wlr_signal_emit_safe(&output->events.commit, &event);
+ wl_signal_emit_mutable(&output->events.commit, &event);
wlr_buffer_unlock(back_buffer);
if (new_back_buffer) {
@@ -876,7 +875,7 @@ void wlr_output_attach_buffer(struct wlr_output *output,
void wlr_output_send_frame(struct wlr_output *output) {
output->frame_pending = false;
if (output->enabled) {
- wlr_signal_emit_safe(&output->events.frame, output);
+ wl_signal_emit_mutable(&output->events.frame, output);
}
}
@@ -922,7 +921,7 @@ void wlr_output_send_present(struct wlr_output *output,
event->when = &now;
}
- wlr_signal_emit_safe(&output->events.present, event);
+ wl_signal_emit_mutable(&output->events.present, event);
}
void wlr_output_set_gamma(struct wlr_output *output, size_t size,
@@ -954,7 +953,7 @@ void wlr_output_update_needs_frame(struct wlr_output *output) {
return;
}
output->needs_frame = true;
- wlr_signal_emit_safe(&output->events.needs_frame, output);
+ wl_signal_emit_mutable(&output->events.needs_frame, output);
}
void wlr_output_damage_whole(struct wlr_output *output) {
@@ -968,7 +967,7 @@ void wlr_output_damage_whole(struct wlr_output *output) {
.output = output,
.damage = &damage,
};
- wlr_signal_emit_safe(&output->events.damage, &event);
+ wl_signal_emit_mutable(&output->events.damage, &event);
pixman_region32_fini(&damage);
}
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index d2da8bd4..27494248 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -13,7 +13,6 @@
#include <wlr/util/region.h>
#include "types/wlr_buffer.h"
#include "types/wlr_scene.h"
-#include "util/signal.h"
#include "util/time.h"
#define HIGHLIGHT_DAMAGE_FADEOUT_TIME 250
@@ -83,7 +82,7 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
// We want to call the destroy listeners before we do anything else
// in case the destroy signal would like to remove children before they
// are recursively destroyed.
- wlr_signal_emit_safe(&node->events.destroy, NULL);
+ wl_signal_emit_mutable(&node->events.destroy, NULL);
wlr_scene_node_set_enabled(node, false);
@@ -96,7 +95,7 @@ void wlr_scene_node_destroy(struct wlr_scene_node *node) {
struct wlr_scene_output *scene_output;
wl_list_for_each(scene_output, &scene->outputs, link) {
if (active & (1ull << scene_output->index)) {
- wlr_signal_emit_safe(&scene_buffer->events.output_leave,
+ wl_signal_emit_mutable(&scene_buffer->events.output_leave,
scene_output);
}
}
@@ -385,9 +384,9 @@ static void update_node_update_outputs(struct wlr_scene_node *node,
bool intersects_before = old_active & mask;
if (intersects && !intersects_before) {
- wlr_signal_emit_safe(&scene_buffer->events.output_enter, scene_output);
+ wl_signal_emit_mutable(&scene_buffer->events.output_enter, scene_output);
} else if (!intersects && intersects_before) {
- wlr_signal_emit_safe(&scene_buffer->events.output_leave, scene_output);
+ wl_signal_emit_mutable(&scene_buffer->events.output_leave, scene_output);
}
}
}
@@ -723,7 +722,7 @@ void wlr_scene_buffer_set_transform(struct wlr_scene_buffer *scene_buffer,
void wlr_scene_buffer_send_frame_done(struct wlr_scene_buffer *scene_buffer,
struct timespec *now) {
if (pixman_region32_not_empty(&scene_buffer->node.visible)) {
- wlr_signal_emit_safe(&scene_buffer->events.frame_done, now);
+ wl_signal_emit_mutable(&scene_buffer->events.frame_done, now);
}
}
@@ -1106,7 +1105,7 @@ static void scene_node_render(struct wlr_scene_node *node,
render_texture(output, &render_region, texture, &scene_buffer->src_box,
&dst_box, matrix);
- wlr_signal_emit_safe(&scene_buffer->events.output_present, scene_output);
+ wl_signal_emit_mutable(&scene_buffer->events.output_present, scene_output);
break;
}
@@ -1259,7 +1258,7 @@ void wlr_scene_output_destroy(struct wlr_scene_output *scene_output) {
return;
}
- wlr_signal_emit_safe(&scene_output->events.destroy, NULL);
+ wl_signal_emit_mutable(&scene_output->events.destroy, NULL);
scene_node_output_update(&scene_output->scene->tree.node,
&scene_output->scene->outputs, scene_output);
@@ -1498,7 +1497,7 @@ bool wlr_scene_output_commit(struct wlr_scene_output *scene_output) {
assert(node->type == WLR_SCENE_NODE_BUFFER);
struct wlr_scene_buffer *buffer = wlr_scene_buffer_from_node(node);
- wlr_signal_emit_safe(&buffer->events.output_present, scene_output);
+ wl_signal_emit_mutable(&buffer->events.output_present, scene_output);
return true;
}
diff --git a/types/seat/wlr_seat.c b/types/seat/wlr_seat.c
index d7652c12..59b760ca 100644
--- a/types/seat/wlr_seat.c
+++ b/types/seat/wlr_seat.c
@@ -11,7 +11,6 @@
#include <wlr/util/log.h>
#include "types/wlr_seat.h"
#include "util/global.h"
-#include "util/signal.h"
#define SEAT_VERSION 8
@@ -67,7 +66,7 @@ static void seat_client_handle_resource_destroy(
return;
}
- wlr_signal_emit_safe(&client->events.destroy, client);
+ wl_signal_emit_mutable(&client->events.destroy, client);
if (client == client->seat->pointer_state.focused_client) {
client->seat->pointer_state.focused_client = NULL;
@@ -181,7 +180,7 @@ void wlr_seat_destroy(struct wlr_seat *seat) {
wlr_seat_touch_point_clear_focus(seat, 0, point->touch_id);
}
- wlr_signal_emit_safe(&seat->events.destroy, seat);
+ wl_signal_emit_mutable(&seat->events.destroy, seat);
wl_list_remove(&seat->display_destroy.link);
diff --git a/types/seat/wlr_seat_keyboard.c b/types/seat/wlr_seat_keyboard.c
index e1f13783..186b8251 100644
--- a/types/seat/wlr_seat_keyboard.c
+++ b/types/seat/wlr_seat_keyboard.c
@@ -8,7 +8,6 @@
#include <wlr/util/log.h>
#include "types/wlr_data_device.h"
#include "types/wlr_seat.h"
-#include "util/signal.h"
static void default_keyboard_enter(struct wlr_seat_keyboard_grab *grab,
struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes,
@@ -168,7 +167,7 @@ void wlr_seat_keyboard_start_grab(struct wlr_seat *wlr_seat,
grab->seat = wlr_seat;
wlr_seat->keyboard_state.grab = grab;
- wlr_signal_emit_safe(&wlr_seat->events.keyboard_grab_begin, grab);
+ wl_signal_emit_mutable(&wlr_seat->events.keyboard_grab_begin, grab);
}
void wlr_seat_keyboard_end_grab(struct wlr_seat *wlr_seat) {
@@ -176,7 +175,7 @@ void wlr_seat_keyboard_end_grab(struct wlr_seat *wlr_seat) {
if (grab != wlr_seat->keyboard_state.default_grab) {
wlr_seat->keyboard_state.grab = wlr_seat->keyboard_state.default_grab;
- wlr_signal_emit_safe(&wlr_seat->events.keyboard_grab_end, grab);
+ wl_signal_emit_mutable(&wlr_seat->events.keyboard_grab_end, grab);
if (grab->interface->cancel) {
grab->interface->cancel(grab);
}
@@ -303,7 +302,7 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat,
.old_surface = focused_surface,
.new_surface = surface,
};
- wlr_signal_emit_safe(&seat->keyboard_state.events.focus_change, &event);
+ wl_signal_emit_mutable(&seat->keyboard_state.events.focus_change, &event);
}
void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat,
diff --git a/types/seat/wlr_seat_pointer.c b/types/seat/wlr_seat_pointer.c
index 2b49b79f..5a6cb235 100644
--- a/types/seat/wlr_seat_pointer.c
+++ b/types/seat/wlr_seat_pointer.c
@@ -7,7 +7,6 @@
#include <wlr/types/wlr_compositor.h>
#include <wlr/util/log.h>
#include "types/wlr_seat.h"
-#include "util/signal.h"
#include "util/array.h"
static void default_pointer_enter(struct wlr_seat_pointer_grab *grab,
@@ -101,7 +100,7 @@ static void pointer_set_cursor(struct wl_client *client,
.hotspot_x = hotspot_x,
.hotspot_y = hotspot_y,
};
- wlr_signal_emit_safe(&seat_client->seat->events.request_set_cursor, &event);
+ wl_signal_emit_mutable(&seat_client->seat->events.request_set_cursor, &event);
}
static void pointer_release(struct wl_client *client,
@@ -211,7 +210,7 @@ void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat,
.sx = sx,
.sy = sy,
};
- wlr_signal_emit_safe(&wlr_seat->pointer_state.events.focus_change, &event);
+ wl_signal_emit_mutable(&wlr_seat->pointer_state.events.focus_change, &event);
}
void wlr_seat_pointer_clear_focus(struct wlr_seat *wlr_seat) {
@@ -403,14 +402,14 @@ void wlr_seat_pointer_start_grab(struct wlr_seat *wlr_seat,
grab->seat = wlr_seat;
wlr_seat->pointer_state.grab = grab;
- wlr_signal_emit_safe(&wlr_seat->events.pointer_grab_begin, grab);
+ wl_signal_emit_mutable(&wlr_seat->events.pointer_grab_begin, grab);
}
void wlr_seat_pointer_end_grab(struct wlr_seat *wlr_seat) {
struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab;
if (grab != wlr_seat->pointer_state.default_grab) {
wlr_seat->pointer_state.grab = wlr_seat->pointer_state.default_grab;
- wlr_signal_emit_safe(&wlr_seat->events.pointer_grab_end, grab);
+ wl_signal_emit_mutable(&wlr_seat->events.pointer_grab_end, grab);
if (grab->interface->cancel) {
grab->interface->cancel(grab);
}
diff --git a/types/seat/wlr_seat_touch.c b/types/seat/wlr_seat_touch.c
index abc17ae2..9b533c07 100644
--- a/types/seat/wlr_seat_touch.c
+++ b/types/seat/wlr_seat_touch.c
@@ -7,7 +7,6 @@
#include <wlr/types/wlr_compositor.h>
#include <wlr/util/log.h>
#include "types/wlr_seat.h"
-#include "util/signal.h"
static uint32_t default_touch_down(struct wlr_seat_touch_grab *grab,
uint32_t time, struct wlr_touch_point *point) {
@@ -84,7 +83,7 @@ void wlr_seat_touch_start_grab(struct wlr_seat *wlr_seat,
grab->seat = wlr_seat;
wlr_seat->touch_state.grab = grab;
- wlr_signal_emit_safe(&wlr_seat->events.touch_grab_begin, grab);
+ wl_signal_emit_mutable(&wlr_seat->events.touch_grab_begin, grab);
}
void wlr_seat_touch_end_grab(struct wlr_seat *wlr_seat) {
@@ -92,7 +91,7 @@ void wlr_seat_touch_end_grab(struct wlr_seat *wlr_seat) {
if (grab != wlr_seat->touch_state.default_grab) {
wlr_seat->touch_state.grab = wlr_seat->touch_state.default_grab;
- wlr_signal_emit_safe(&wlr_seat->events.touch_grab_end, grab);
+ wl_signal_emit_mutable(&wlr_seat->events.touch_grab_end, grab);
if (grab->interface->cancel) {
grab->interface->cancel(grab);
}
@@ -108,7 +107,7 @@ static void touch_point_clear_focus(struct wlr_touch_point *point) {
}
static void touch_point_destroy(struct wlr_touch_point *point) {
- wlr_signal_emit_safe(&point->events.destroy, point);
+ wl_signal_emit_mutable(&point->events.destroy, point);
touch_point_clear_focus(point);
wl_list_remove(&point->surface_destroy.link);
diff --git a/types/tablet_v2/wlr_tablet_v2.c b/types/tablet_v2/wlr_tablet_v2.c
index 3bd33311..63bce2f7 100644
--- a/types/tablet_v2/wlr_tablet_v2.c
+++ b/types/tablet_v2/wlr_tablet_v2.c
@@ -13,7 +13,6 @@
#include <wlr/types/wlr_tablet_v2.h>
#include <wlr/util/log.h>
#include "tablet-unstable-v2-protocol.h"
-#include "util/signal.h"
#define TABLET_MANAGER_VERSION 1
@@ -275,7 +274,7 @@ static void tablet_v2_bind(struct wl_client *wl_client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_tablet_manager_v2 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->wl_global);
free(manager);
diff --git a/types/tablet_v2/wlr_tablet_v2_pad.c b/types/tablet_v2/wlr_tablet_v2_pad.c
index a7ac9ef8..1bdb4ab7 100644
--- a/types/tablet_v2/wlr_tablet_v2_pad.c
+++ b/types/tablet_v2/wlr_tablet_v2_pad.c
@@ -11,7 +11,6 @@
#include <wlr/types/wlr_tablet_pad.h>
#include <wlr/types/wlr_tablet_v2.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "tablet-unstable-v2-protocol.h"
static const struct wlr_tablet_pad_v2_grab_interface default_pad_grab_interface;
@@ -52,7 +51,7 @@ static void handle_tablet_pad_ring_v2_set_feedback(struct wl_client *client,
.index = aux->index
};
- wlr_signal_emit_safe(&aux->pad->pad->events.ring_feedback, &evt);
+ wl_signal_emit_mutable(&aux->pad->pad->events.ring_feedback, &evt);
}
static void handle_tablet_pad_ring_v2_destroy(struct wl_client *client,
@@ -90,7 +89,7 @@ static void handle_tablet_pad_strip_v2_set_feedback(struct wl_client *client,
.index = aux->index
};
- wlr_signal_emit_safe(&aux->pad->pad->events.strip_feedback, &evt);
+ wl_signal_emit_mutable(&aux->pad->pad->events.strip_feedback, &evt);
}
static void handle_tablet_pad_strip_v2_destroy(struct wl_client *client,
@@ -117,7 +116,7 @@ static void handle_tablet_pad_v2_set_feedback( struct wl_client *client,
.description = description,
};
- wlr_signal_emit_safe(&pad->pad->events.button_feedback, &evt);
+ wl_signal_emit_mutable(&pad->pad->events.button_feedback, &evt);
}
static const struct zwp_tablet_pad_v2_interface tablet_pad_impl = {
diff --git a/types/tablet_v2/wlr_tablet_v2_tool.c b/types/tablet_v2/wlr_tablet_v2_tool.c
index e47e9103..a2d7778c 100644
--- a/types/tablet_v2/wlr_tablet_v2_tool.c
+++ b/types/tablet_v2/wlr_tablet_v2_tool.c
@@ -11,7 +11,6 @@
#include <wlr/types/wlr_tablet_v2.h>
#include <wlr/util/log.h>
#include "util/array.h"
-#include "util/signal.h"
#include "util/time.h"
#include "tablet-unstable-v2-protocol.h"
@@ -47,7 +46,7 @@ static void handle_tablet_tool_v2_set_cursor(struct wl_client *client,
.seat_client = tool->seat->seat_client,
};
- wlr_signal_emit_safe(&tool->tool->events.set_cursor, &evt);
+ wl_signal_emit_mutable(&tool->tool->events.set_cursor, &evt);
}
static void handle_tablet_tool_v2_destroy(struct wl_client *client,
diff --git a/types/wlr_buffer.c b/types/wlr_buffer.c
index b63ce88a..90bc40a8 100644
--- a/types/wlr_buffer.c
+++ b/types/wlr_buffer.c
@@ -9,7 +9,6 @@
#include <wlr/util/log.h>
#include "render/pixel_format.h"
#include "types/wlr_buffer.h"
-#include "util/signal.h"
void wlr_buffer_init(struct wlr_buffer *buffer,
const struct wlr_buffer_impl *impl, int width, int height) {
@@ -34,7 +33,7 @@ static void buffer_consider_destroy(struct wlr_buffer *buffer) {
assert(!buffer->accessing_data_ptr);
- wlr_signal_emit_safe(&buffer->events.destroy, NULL);
+ wl_signal_emit_mutable(&buffer->events.destroy, NULL);
wlr_addon_set_finish(&buffer->addons);
buffer->impl->destroy(buffer);
@@ -64,7 +63,7 @@ void wlr_buffer_unlock(struct wlr_buffer *buffer) {
buffer->n_locks--;
if (buffer->n_locks == 0) {
- wlr_signal_emit_safe(&buffer->events.release, NULL);
+ wl_signal_emit_mutable(&buffer->events.release, NULL);
}
buffer_consider_destroy(buffer);
diff --git a/types/wlr_compositor.c b/types/wlr_compositor.c
index 331d932d..fd7cc1d0 100644
--- a/types/wlr_compositor.c
+++ b/types/wlr_compositor.c
@@ -12,7 +12,6 @@
#include <wlr/util/region.h>
#include "types/wlr_buffer.h"
#include "types/wlr_region.h"
-#include "util/signal.h"
#include "util/time.h"
#define COMPOSITOR_VERSION 5
@@ -492,7 +491,7 @@ static void surface_commit_state(struct wlr_surface *surface,
surface->role->commit(surface);
}
- wlr_signal_emit_safe(&surface->events.commit, surface);
+ wl_signal_emit_mutable(&surface->events.commit, surface);
}
static void collect_subsurface_damage_iter(struct wlr_surface *surface,
@@ -531,7 +530,7 @@ static void subsurface_parent_commit(struct wlr_subsurface *subsurface) {
if (!subsurface->added) {
subsurface->added = true;
- wlr_signal_emit_safe(&subsurface->parent->events.new_subsurface,
+ wl_signal_emit_mutable(&subsurface->parent->events.new_subsurface,
subsurface);
}
}
@@ -541,7 +540,7 @@ static void surface_handle_commit(struct wl_client *client,
struct wlr_surface *surface = wlr_surface_from_resource(resource);
surface_finalize_pending(surface);
- wlr_signal_emit_safe(&surface->events.client_commit, NULL);
+ wl_signal_emit_mutable(&surface->events.client_commit, NULL);
if (surface->pending.cached_state_locks > 0 || !wl_list_empty(&surface->cached)) {
surface_cache_pending(surface);
@@ -667,7 +666,7 @@ static void surface_handle_resource_destroy(struct wl_resource *resource) {
surface_output_destroy(surface_output);
}
- wlr_signal_emit_safe(&surface->events.destroy, surface);
+ wl_signal_emit_mutable(&surface->events.destroy, surface);
wlr_addon_set_finish(&surface->addons);
@@ -1126,7 +1125,7 @@ static void compositor_create_surface(struct wl_client *client,
return;
}
- wlr_signal_emit_safe(&compositor->events.new_surface, surface);
+ wl_signal_emit_mutable(&compositor->events.new_surface, surface);
}
static void compositor_create_region(struct wl_client *client,
@@ -1156,7 +1155,7 @@ static void compositor_handle_display_destroy(
struct wl_listener *listener, void *data) {
struct wlr_compositor *compositor =
wl_container_of(listener, compositor, display_destroy);
- wlr_signal_emit_safe(&compositor->events.destroy, NULL);
+ wl_signal_emit_mutable(&compositor->events.destroy, NULL);
wl_list_remove(&compositor->display_destroy.link);
wl_global_destroy(compositor->global);
free(compositor);
diff --git a/types/wlr_cursor.c b/types/wlr_cursor.c
index d38d279e..5da51d27 100644
--- a/types/wlr_cursor.c
+++ b/types/wlr_cursor.c
@@ -12,7 +12,6 @@
#include <wlr/types/wlr_touch.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
struct wlr_cursor_device {
struct wlr_cursor *cursor;
@@ -368,7 +367,7 @@ static void handle_pointer_motion(struct wl_listener *listener, void *data) {
struct wlr_pointer_motion_event *event = data;
struct wlr_cursor_device *device =
wl_container_of(listener, device, motion);
- wlr_signal_emit_safe(&device->cursor->events.motion, event);
+ wl_signal_emit_mutable(&device->cursor->events.motion, event);
}
static void apply_output_transform(double *x, double *y,
@@ -440,80 +439,80 @@ static void handle_pointer_motion_absolute(struct wl_listener *listener,
if (output) {
apply_output_transform(&event->x, &event->y, output->transform);
}
- wlr_signal_emit_safe(&device->cursor->events.motion_absolute, event);
+ wl_signal_emit_mutable(&device->cursor->events.motion_absolute, event);
}
static void handle_pointer_button(struct wl_listener *listener, void *data) {
struct wlr_pointer_button_event *event = data;
struct wlr_cursor_device *device =
wl_container_of(listener, device, button);
- wlr_signal_emit_safe(&device->cursor->events.button, event);
+ wl_signal_emit_mutable(&device->cursor->events.button, event);
}
static void handle_pointer_axis(struct wl_listener *listener, void *data) {
struct wlr_pointer_axis_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, axis);
- wlr_signal_emit_safe(&device->cursor->events.axis, event);
+ wl_signal_emit_mutable(&device->cursor->events.axis, event);
}
static void handle_pointer_frame(struct wl_listener *listener, void *data) {
struct wlr_cursor_device *device = wl_container_of(listener, device, frame);
- wlr_signal_emit_safe(&device->cursor->events.frame, device->cursor);
+ wl_signal_emit_mutable(&device->cursor->events.frame, device->cursor);
}
static void handle_pointer_swipe_begin(struct wl_listener *listener, void *data) {
struct wlr_pointer_swipe_begin_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, swipe_begin);
- wlr_signal_emit_safe(&device->cursor->events.swipe_begin, event);
+ wl_signal_emit_mutable(&device->cursor->events.swipe_begin, event);
}
static void handle_pointer_swipe_update(struct wl_listener *listener, void *data) {
struct wlr_pointer_swipe_update_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, swipe_update);
- wlr_signal_emit_safe(&device->cursor->events.swipe_update, event);
+ wl_signal_emit_mutable(&device->cursor->events.swipe_update, event);
}
static void handle_pointer_swipe_end(struct wl_listener *listener, void *data) {
struct wlr_pointer_swipe_end_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, swipe_end);
- wlr_signal_emit_safe(&device->cursor->events.swipe_end, event);
+ wl_signal_emit_mutable(&device->cursor->events.swipe_end, event);
}
static void handle_pointer_pinch_begin(struct wl_listener *listener, void *data) {
struct wlr_pointer_pinch_begin_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, pinch_begin);
- wlr_signal_emit_safe(&device->cursor->events.pinch_begin, event);
+ wl_signal_emit_mutable(&device->cursor->events.pinch_begin, event);
}
static void handle_pointer_pinch_update(struct wl_listener *listener, void *data) {
struct wlr_pointer_pinch_update_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, pinch_update);
- wlr_signal_emit_safe(&device->cursor->events.pinch_update, event);
+ wl_signal_emit_mutable(&device->cursor->events.pinch_update, event);
}
static void handle_pointer_pinch_end(struct wl_listener *listener, void *data) {
struct wlr_pointer_pinch_end_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, pinch_end);
- wlr_signal_emit_safe(&device->cursor->events.pinch_end, event);
+ wl_signal_emit_mutable(&device->cursor->events.pinch_end, event);
}
static void handle_pointer_hold_begin(struct wl_listener *listener, void *data) {
struct wlr_pointer_hold_begin_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, hold_begin);
- wlr_signal_emit_safe(&device->cursor->events.hold_begin, event);
+ wl_signal_emit_mutable(&device->cursor->events.hold_begin, event);
}
static void handle_pointer_hold_end(struct wl_listener *listener, void *data) {
struct wlr_pointer_hold_end_event *event = data;
struct wlr_cursor_device *device = wl_container_of(listener, device, hold_end);
- wlr_signal_emit_safe(&device->cursor->events.hold_end, event);
+ wl_signal_emit_mutable(&device->cursor->events.hold_end, event);
}
static void handle_touch_up(struct wl_listener *listener, void *data) {
struct wlr_touch_up_event *event = data;
struct wlr_cursor_device *device;
device = wl_container_of(listener, device, touch_up);
- wlr_signal_emit_safe(&device->cursor->events.touch_up, event);
+ wl_signal_emit_mutable(&device->cursor->events.touch_up, event);
}
static void handle_touch_down(struct wl_listener *listener, void *data) {
@@ -526,7 +525,7 @@ static void handle_touch_down(struct wl_listener *listener, void *data) {
if (output) {
apply_output_transform(&event->x, &event->y, output->transform);
}
- wlr_signal_emit_safe(&device->cursor->events.touch_down, event);
+ wl_signal_emit_mutable(&device->cursor->events.touch_down, event);
}
static void handle_touch_motion(struct wl_listener *listener, void *data) {
@@ -539,20 +538,20 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) {
if (output) {
apply_output_transform(&event->x, &event->y, output->transform);
}
- wlr_signal_emit_safe(&device->cursor->events.touch_motion, event);
+ wl_signal_emit_mutable(&device->cursor->events.touch_motion, event);
}
static void handle_touch_cancel(struct wl_listener *listener, void *data) {
struct wlr_touch_cancel_event *event = data;
struct wlr_cursor_device *device;
device = wl_container_of(listener, device, touch_cancel);
- wlr_signal_emit_safe(&device->cursor->events.touch_cancel, event);
+ wl_signal_emit_mutable(&device->cursor->events.touch_cancel, event);
}
static void handle_touch_frame(struct wl_listener *listener, void *data) {
struct wlr_cursor_device *device =
wl_container_of(listener, device, touch_frame);
- wlr_signal_emit_safe(&device->cursor->events.touch_frame, NULL);
+ wl_signal_emit_mutable(&device->cursor->events.touch_frame, NULL);
}
static void handle_tablet_tool_tip(struct wl_listener *listener, void *data) {
@@ -565,7 +564,7 @@ static void handle_tablet_tool_tip(struct wl_listener *listener, void *data) {
if (output) {
apply_output_transform(&event->x, &event->y, output->transform);
}
- wlr_signal_emit_safe(&device->cursor->events.tablet_tool_tip, event);
+ wl_signal_emit_mutable(&device->cursor->events.tablet_tool_tip, event);
}
static void handle_tablet_tool_axis(struct wl_listener *listener, void *data) {
@@ -600,7 +599,7 @@ static void handle_tablet_tool_axis(struct wl_listener *listener, void *data) {
}
}
- wlr_signal_emit_safe(&device->cursor->events.tablet_tool_axis, event);
+ wl_signal_emit_mutable(&device->cursor->events.tablet_tool_axis, event);
}
static void handle_tablet_tool_button(struct wl_listener *listener,
@@ -608,7 +607,7 @@ static void handle_tablet_tool_button(struct wl_listener *listener,
struct wlr_tablet_tool_button *event = data;
struct wlr_cursor_device *device;
device = wl_container_of(listener, device, tablet_tool_button);
- wlr_signal_emit_safe(&device->cursor->events.tablet_tool_button, event);
+ wl_signal_emit_mutable(&device->cursor->events.tablet_tool_button, event);
}
static void handle_tablet_tool_proximity(struct wl_listener *listener,
@@ -622,7 +621,7 @@ static void handle_tablet_tool_proximity(struct wl_listener *listener,
if (output) {
apply_output_transform(&event->x, &event->y, output->transform);
}
- wlr_signal_emit_safe(&device->cursor->events.tablet_tool_proximity, event);
+ wl_signal_emit_mutable(&device->cursor->events.tablet_tool_proximity, event);
}
static void handle_device_destroy(struct wl_listener *listener, void *data) {
diff --git a/types/wlr_damage_ring.c b/types/wlr_damage_ring.c
index 378051c7..000aba93 100644
--- a/types/wlr_damage_ring.c
+++ b/types/wlr_damage_ring.c
@@ -4,7 +4,6 @@
#include <pixman.h>
#include <wlr/types/wlr_damage_ring.h>
#include <wlr/util/box.h>
-#include "util/signal.h"
#define WLR_DAMAGE_RING_MAX_RECTS 20
diff --git a/types/wlr_data_control_v1.c b/types/wlr_data_control_v1.c
index 239e238a..55789d4d 100644
--- a/types/wlr_data_control_v1.c
+++ b/types/wlr_data_control_v1.c
@@ -7,7 +7,6 @@
#include <wlr/types/wlr_data_device.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-data-control-unstable-v1-protocol.h"
#define DATA_CONTROL_MANAGER_VERSION 2
@@ -628,7 +627,7 @@ static void manager_handle_get_data_device(struct wl_client *client,
&device->seat_set_primary_selection);
wl_list_insert(&manager->devices, &device->link);
- wlr_signal_emit_safe(&manager->events.new_device, device);
+ wl_signal_emit_mutable(&manager->events.new_device, device);
// At this point maybe the compositor decided to destroy the device. If
// it's the case then the resource will be inert.
@@ -666,7 +665,7 @@ static void manager_bind(struct wl_client *client, void *data, uint32_t version,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_data_control_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_drm.c b/types/wlr_drm.c
index 0d50138c..32eea1c7 100644
--- a/types/wlr_drm.c
+++ b/types/wlr_drm.c
@@ -11,7 +11,6 @@
#include <wlr/types/wlr_drm.h>
#include <wlr/util/log.h>
#include "drm-protocol.h"
-#include "util/signal.h"
#define WLR_DRM_VERSION 2
@@ -172,7 +171,7 @@ static void drm_bind(struct wl_client *client, void *data,
}
static void drm_destroy(struct wlr_drm *drm) {
- wlr_signal_emit_safe(&drm->events.destroy, NULL);
+ wl_signal_emit_mutable(&drm->events.destroy, NULL);
wl_list_remove(&drm->display_destroy.link);
wl_list_remove(&drm->renderer_destroy.link);
diff --git a/types/wlr_drm_lease_v1.c b/types/wlr_drm_lease_v1.c
index 0ef9e036..315c5ff9 100644
--- a/types/wlr_drm_lease_v1.c
+++ b/types/wlr_drm_lease_v1.c
@@ -9,7 +9,6 @@
#include <wlr/util/log.h>
#include "backend/drm/drm.h"
#include "drm-lease-v1-protocol.h"
-#include "util/signal.h"
#include "util/global.h"
#define DRM_LEASE_DEVICE_V1_VERSION 1
@@ -353,7 +352,7 @@ static void drm_lease_request_v1_handle_submit(
request->lease = lease;
/* TODO: reject the request if the user does not grant it */
- wlr_signal_emit_safe(&request->device->manager->events.request,
+ wl_signal_emit_mutable(&request->device->manager->events.request,
request);
/* Request is done */
diff --git a/types/wlr_export_dmabuf_v1.c b/types/wlr_export_dmabuf_v1.c
index b47758c6..c1d26e60 100644
--- a/types/wlr_export_dmabuf_v1.c
+++ b/types/wlr_export_dmabuf_v1.c
@@ -6,7 +6,6 @@
#include <wlr/types/wlr_export_dmabuf_v1.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-export-dmabuf-unstable-v1-protocol.h"
#define EXPORT_DMABUF_MANAGER_VERSION 1
@@ -182,7 +181,7 @@ static void manager_bind(struct wl_client *client, void *data, uint32_t version,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_export_dmabuf_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_foreign_toplevel_management_v1.c b/types/wlr_foreign_toplevel_management_v1.c
index a700a115..c6fea5b7 100644
--- a/types/wlr_foreign_toplevel_management_v1.c
+++ b/types/wlr_foreign_toplevel_management_v1.c
@@ -7,7 +7,6 @@
#include <wlr/types/wlr_foreign_toplevel_management_v1.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-foreign-toplevel-management-unstable-v1-protocol.h"
#define FOREIGN_TOPLEVEL_MANAGEMENT_V1_VERSION 3
@@ -33,7 +32,7 @@ static void toplevel_handle_send_maximized_event(struct wl_resource *resource,
.toplevel = toplevel,
.maximized = state,
};
- wlr_signal_emit_safe(&toplevel->events.request_maximize, &event);
+ wl_signal_emit_mutable(&toplevel->events.request_maximize, &event);
}
static void foreign_toplevel_handle_set_maximized(struct wl_client *client,
@@ -58,7 +57,7 @@ static void toplevel_send_minimized_event(struct wl_resource *resource,
.toplevel = toplevel,
.minimized = state,
};
- wlr_signal_emit_safe(&toplevel->events.request_minimize, &event);
+ wl_signal_emit_mutable(&toplevel->events.request_minimize, &event);
}
static void foreign_toplevel_handle_set_minimized(struct wl_client *client,
@@ -88,7 +87,7 @@ static void toplevel_send_fullscreen_event(struct wl_resource *resource,
.fullscreen = state,
.output = output,
};
- wlr_signal_emit_safe(&toplevel->events.request_fullscreen, &event);
+ wl_signal_emit_mutable(&toplevel->events.request_fullscreen, &event);
}
static void foreign_toplevel_handle_set_fullscreen(struct wl_client *client,
@@ -117,7 +116,7 @@ static void foreign_toplevel_handle_activate(struct wl_client *client,
.toplevel = toplevel,
.seat = seat_client->seat,
};
- wlr_signal_emit_safe(&toplevel->events.request_activate, &event);
+ wl_signal_emit_mutable(&toplevel->events.request_activate, &event);
}
static void foreign_toplevel_handle_close(struct wl_client *client,
@@ -127,7 +126,7 @@ static void foreign_toplevel_handle_close(struct wl_client *client,
if (!toplevel) {
return;
}
- wlr_signal_emit_safe(&toplevel->events.request_close, toplevel);
+ wl_signal_emit_mutable(&toplevel->events.request_close, toplevel);
}
static void foreign_toplevel_handle_set_rectangle(struct wl_client *client,
@@ -154,7 +153,7 @@ static void foreign_toplevel_handle_set_rectangle(struct wl_client *client,
.width = width,
.height = height,
};
- wlr_signal_emit_safe(&toplevel->events.set_rectangle, &event);
+ wl_signal_emit_mutable(&toplevel->events.set_rectangle, &event);
}
static void foreign_toplevel_handle_destroy(struct wl_client *client,
@@ -495,7 +494,7 @@ void wlr_foreign_toplevel_handle_v1_destroy(
return;
}
- wlr_signal_emit_safe(&toplevel->events.destroy, toplevel);
+ wl_signal_emit_mutable(&toplevel->events.destroy, toplevel);
struct wl_resource *resource, *tmp;
wl_resource_for_each_safe(resource, tmp, &toplevel->resources) {
@@ -678,7 +677,7 @@ static void foreign_toplevel_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_foreign_toplevel_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_fullscreen_shell_v1.c b/types/wlr_fullscreen_shell_v1.c
index 7e9f8553..4d4ded48 100644
--- a/types/wlr_fullscreen_shell_v1.c
+++ b/types/wlr_fullscreen_shell_v1.c
@@ -4,7 +4,6 @@
#include <wlr/types/wlr_fullscreen_shell_v1.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#define FULLSCREEN_SHELL_VERSION 1
@@ -37,7 +36,7 @@ static void shell_handle_present_surface(struct wl_client *client,
.method = method,
.output = output,
};
- wlr_signal_emit_safe(&shell->events.present_surface, &event);
+ wl_signal_emit_mutable(&shell->events.present_surface, &event);
}
static void shell_handle_present_surface_for_mode(struct wl_client *client,
@@ -79,7 +78,7 @@ static void shell_bind(struct wl_client *client, void *data, uint32_t version,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_fullscreen_shell_v1 *shell =
wl_container_of(listener, shell, display_destroy);
- wlr_signal_emit_safe(&shell->events.destroy, shell);
+ wl_signal_emit_mutable(&shell->events.destroy, shell);
wl_list_remove(&shell->display_destroy.link);
wl_global_destroy(shell->global);
free(shell);
diff --git a/types/wlr_gamma_control_v1.c b/types/wlr_gamma_control_v1.c
index 095b4a6f..009a42a5 100644
--- a/types/wlr_gamma_control_v1.c
+++ b/types/wlr_gamma_control_v1.c
@@ -7,7 +7,6 @@
#include <wlr/types/wlr_gamma_control_v1.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-gamma-control-unstable-v1-protocol.h"
#define GAMMA_CONTROL_MANAGER_V1_VERSION 1
@@ -259,7 +258,7 @@ static void gamma_control_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_gamma_control_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_idle.c b/types/wlr_idle.c
index 4c338931..cb3a1cc3 100644
--- a/types/wlr_idle.c
+++ b/types/wlr_idle.c
@@ -5,7 +5,6 @@
#include <wlr/types/wlr_idle.h>
#include <wlr/util/log.h>
#include "idle-protocol.h"
-#include "util/signal.h"
static const struct org_kde_kwin_idle_timeout_interface idle_timeout_impl;
@@ -22,7 +21,7 @@ static int idle_notify(void *data) {
return 0;
}
timer->idle_state = true;
- wlr_signal_emit_safe(&timer->events.idle, timer);
+ wl_signal_emit_mutable(&timer->events.idle, timer);
if (timer->resource) {
org_kde_kwin_idle_timeout_send_idle(timer->resource);
@@ -38,7 +37,7 @@ static void handle_activity(struct wlr_idle_timeout *timer) {
// in case the previous state was sleeping send a resume event and switch state
if (timer->idle_state) {
timer->idle_state = false;
- wlr_signal_emit_safe(&timer->events.resume, timer);
+ wl_signal_emit_mutable(&timer->events.resume, timer);
if (timer->resource) {
org_kde_kwin_idle_timeout_send_resumed(timer->resource);
@@ -212,7 +211,7 @@ static void idle_bind(struct wl_client *wl_client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_idle *idle = wl_container_of(listener, idle, display_destroy);
- wlr_signal_emit_safe(&idle->events.destroy, idle);
+ wl_signal_emit_mutable(&idle->events.destroy, idle);
wl_list_remove(&idle->display_destroy.link);
wl_global_destroy(idle->global);
free(idle);
@@ -249,7 +248,7 @@ struct wlr_idle *wlr_idle_create(struct wl_display *display) {
}
void wlr_idle_notify_activity(struct wlr_idle *idle, struct wlr_seat *seat) {
- wlr_signal_emit_safe(&idle->events.activity_notify, seat);
+ wl_signal_emit_mutable(&idle->events.activity_notify, seat);
}
struct wlr_idle_timeout *wlr_idle_timeout_create(struct wlr_idle *idle,
@@ -258,7 +257,7 @@ struct wlr_idle_timeout *wlr_idle_timeout_create(struct wlr_idle *idle,
}
void wlr_idle_timeout_destroy(struct wlr_idle_timeout *timer) {
- wlr_signal_emit_safe(&timer->events.destroy, NULL);
+ wl_signal_emit_mutable(&timer->events.destroy, NULL);
wl_list_remove(&timer->input_listener.link);
wl_list_remove(&timer->seat_destroy.link);
diff --git a/types/wlr_idle_inhibit_v1.c b/types/wlr_idle_inhibit_v1.c
index 61a66dc1..7369643e 100644
--- a/types/wlr_idle_inhibit_v1.c
+++ b/types/wlr_idle_inhibit_v1.c
@@ -1,6 +1,5 @@
#include <assert.h>
#include <stdlib.h>
-#include <util/signal.h>
#include <wayland-server-core.h>
#include <wayland-util.h>
#include <wlr/types/wlr_compositor.h>
@@ -33,7 +32,7 @@ static void idle_inhibitor_v1_destroy(struct wlr_idle_inhibitor_v1 *inhibitor) {
return;
}
- wlr_signal_emit_safe(&inhibitor->events.destroy, inhibitor->surface);
+ wl_signal_emit_mutable(&inhibitor->events.destroy, inhibitor->surface);
wl_resource_set_user_data(inhibitor->resource, NULL);
wl_list_remove(&inhibitor->link);
@@ -98,7 +97,7 @@ static void manager_handle_create_inhibitor(struct wl_client *client,
inhibitor, idle_inhibitor_v1_handle_resource_destroy);
wl_list_insert(&manager->inhibitors, &inhibitor->link);
- wlr_signal_emit_safe(&manager->events.new_inhibitor, inhibitor);
+ wl_signal_emit_mutable(&manager->events.new_inhibitor, inhibitor);
}
static void manager_handle_destroy(struct wl_client *client,
@@ -114,7 +113,7 @@ static const struct zwp_idle_inhibit_manager_v1_interface idle_inhibit_impl = {
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_idle_inhibit_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_input_device.c b/types/wlr_input_device.c
index 87cc64b8..21916d69 100644
--- a/types/wlr_input_device.c
+++ b/types/wlr_input_device.c
@@ -3,7 +3,6 @@
#include <stdlib.h>
#include <string.h>
#include "interfaces/wlr_input_device.h"
-#include "util/signal.h"
void wlr_input_device_init(struct wlr_input_device *dev,
enum wlr_input_device_type type, const char *name) {
@@ -21,7 +20,7 @@ void wlr_input_device_finish(struct wlr_input_device *wlr_device) {
return;
}
- wlr_signal_emit_safe(&wlr_device->events.destroy, wlr_device);
+ wl_signal_emit_mutable(&wlr_device->events.destroy, wlr_device);
wl_list_remove(&wlr_device->events.destroy.listener_list);
diff --git a/types/wlr_input_inhibitor.c b/types/wlr_input_inhibitor.c
index 55b14175..c6fbb5af 100644
--- a/types/wlr_input_inhibitor.c
+++ b/types/wlr_input_inhibitor.c
@@ -4,7 +4,6 @@
#include <wayland-server-core.h>
#include "wlr/types/wlr_input_inhibitor.h"
#include "wlr-input-inhibitor-unstable-v1-protocol.h"
-#include "util/signal.h"
static const struct zwlr_input_inhibit_manager_v1_interface inhibit_manager_implementation;
static const struct zwlr_input_inhibitor_v1_interface input_inhibitor_implementation;
@@ -27,7 +26,7 @@ static void input_inhibit_manager_deactivate(
}
manager->active_client = NULL;
manager->active_inhibitor = NULL;
- wlr_signal_emit_safe(&manager->events.deactivate, manager);
+ wl_signal_emit_mutable(&manager->events.deactivate, manager);
}
static void input_inhibitor_destroy(struct wl_client *client,
@@ -71,7 +70,7 @@ static void inhibit_manager_get_inhibitor(struct wl_client *client,
manager->active_client = client;
manager->active_inhibitor = wl_resource;
- wlr_signal_emit_safe(&manager->events.activate, manager);
+ wl_signal_emit_mutable(&manager->events.activate, manager);
}
static const struct zwlr_input_inhibit_manager_v1_interface inhibit_manager_implementation = {
@@ -106,7 +105,7 @@ static void inhibit_manager_bind(struct wl_client *wl_client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_input_inhibit_manager *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_input_method_v2.c b/types/wlr_input_method_v2.c
index 4a436e41..6d2e49f9 100644
--- a/types/wlr_input_method_v2.c
+++ b/types/wlr_input_method_v2.c
@@ -12,7 +12,6 @@
#include <xkbcommon/xkbcommon.h>
#include "input-method-unstable-v2-protocol.h"
#include "util/shm.h"
-#include "util/signal.h"
static const struct zwp_input_method_v2_interface input_method_impl;
static const struct zwp_input_method_keyboard_grab_v2_interface keyboard_grab_impl;
@@ -41,7 +40,7 @@ static void input_method_destroy(struct wlr_input_method_v2 *input_method) {
popup_surface, tmp, &input_method->popup_surfaces, link) {
popup_surface_destroy(popup_surface);
}
- wlr_signal_emit_safe(&input_method->events.destroy, input_method);
+ wl_signal_emit_mutable(&input_method->events.destroy, input_method);
wl_list_remove(wl_resource_get_link(input_method->resource));
wl_list_remove(&input_method->seat_client_destroy.link);
wlr_input_method_keyboard_grab_v2_destroy(input_method->keyboard_grab);
@@ -76,7 +75,7 @@ static void im_commit(struct wl_client *client, struct wl_resource *resource,
input_method->current_serial = serial;
struct wlr_input_method_v2_state default_state = {0};
input_method->pending = default_state;
- wlr_signal_emit_safe(&input_method->events.commit, (void*)input_method);
+ wl_signal_emit_mutable(&input_method->events.commit, (void*)input_method);
}
static void im_commit_string(struct wl_client *client,
@@ -141,10 +140,10 @@ static void popup_surface_set_mapped(
struct wlr_input_popup_surface_v2 *popup_surface, bool mapped) {
if (mapped && !popup_surface->mapped) {
popup_surface->mapped = true;
- wlr_signal_emit_safe(&popup_surface->events.map, popup_surface);
+ wl_signal_emit_mutable(&popup_surface->events.map, popup_surface);
} else if (!mapped && popup_surface->mapped) {
popup_surface->mapped = false;
- wlr_signal_emit_safe(&popup_surface->events.unmap, popup_surface);
+ wl_signal_emit_mutable(&popup_surface->events.unmap, popup_surface);
}
}
@@ -182,7 +181,7 @@ bool wlr_surface_is_input_popup_surface_v2(struct wlr_surface *surface) {
static void popup_surface_destroy(
struct wlr_input_popup_surface_v2 *popup_surface) {
popup_surface_set_mapped(popup_surface, false);
- wlr_signal_emit_safe(&popup_surface->events.destroy, NULL);
+ wl_signal_emit_mutable(&popup_surface->events.destroy, NULL);
wl_list_remove(&popup_surface->surface_destroy.link);
wl_list_remove(&popup_surface->link);
wl_resource_set_user_data(popup_surface->resource, NULL);
@@ -264,7 +263,7 @@ static void im_get_input_popup_surface(struct wl_client *client,
&& popup_surface->input_method->client_active);
wl_list_insert(&input_method->popup_surfaces, &popup_surface->link);
- wlr_signal_emit_safe(&input_method->events.new_popup_surface, popup_surface);
+ wl_signal_emit_mutable(&input_method->events.new_popup_surface, popup_surface);
}
void wlr_input_method_keyboard_grab_v2_destroy(
@@ -272,7 +271,7 @@ void wlr_input_method_keyboard_grab_v2_destroy(
if (!keyboard_grab) {
return;
}
- wlr_signal_emit_safe(&keyboard_grab->events.destroy, keyboard_grab);
+ wl_signal_emit_mutable(&keyboard_grab->events.destroy, keyboard_grab);
keyboard_grab->input_method->keyboard_grab = NULL;
if (keyboard_grab->keyboard) {
wl_list_remove(&keyboard_grab->keyboard_keymap.link);
@@ -452,7 +451,7 @@ static void im_grab_keyboard(struct wl_client *client,
keyboard_grab->input_method = input_method;
input_method->keyboard_grab = keyboard_grab;
wl_signal_init(&keyboard_grab->events.destroy);
- wlr_signal_emit_safe(&input_method->events.grab_keyboard, keyboard_grab);
+ wl_signal_emit_mutable(&input_method->events.grab_keyboard, keyboard_grab);
}
static const struct zwp_input_method_v2_interface input_method_impl = {
@@ -575,7 +574,7 @@ static void manager_get_input_method(struct wl_client *client,
input_method->resource = im_resource;
wl_list_insert(&im_manager->input_methods,
wl_resource_get_link(input_method->resource));
- wlr_signal_emit_safe(&im_manager->events.input_method, input_method);
+ wl_signal_emit_mutable(&im_manager->events.input_method, input_method);
}
static void manager_destroy(struct wl_client *client,
@@ -607,7 +606,7 @@ static void input_method_manager_bind(struct wl_client *wl_client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_input_method_manager_v2 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_keyboard.c b/types/wlr_keyboard.c
index 4d866d00..3fe3ba7a 100644
--- a/types/wlr_keyboard.c
+++ b/types/wlr_keyboard.c
@@ -10,7 +10,6 @@
#include "types/wlr_keyboard.h"
#include "util/array.h"
#include "util/shm.h"
-#include "util/signal.h"
#include "util/time.h"
struct wlr_keyboard *wlr_keyboard_from_input_device(
@@ -91,7 +90,7 @@ void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
bool updated = keyboard_modifier_update(keyboard);
if (updated) {
- wlr_signal_emit_safe(&keyboard->events.modifiers, keyboard);
+ wl_signal_emit_mutable(&keyboard->events.modifiers, keyboard);
}
keyboard_led_update(keyboard);
@@ -100,7 +99,7 @@ void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
struct wlr_keyboard_key_event *event) {
keyboard_key_update(keyboard, event);
- wlr_signal_emit_safe(&keyboard->events.key, event);
+ wl_signal_emit_mutable(&keyboard->events.key, event);
if (keyboard->xkb_state == NULL) {
return;
@@ -114,7 +113,7 @@ void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
bool updated = keyboard_modifier_update(keyboard);
if (updated) {
- wlr_signal_emit_safe(&keyboard->events.modifiers, keyboard);
+ wl_signal_emit_mutable(&keyboard->events.modifiers, keyboard);
}
keyboard_led_update(keyboard);
@@ -246,7 +245,7 @@ bool wlr_keyboard_set_keymap(struct wlr_keyboard *kb,
keyboard_modifier_update(kb);
- wlr_signal_emit_safe(&kb->events.keymap, kb);
+ wl_signal_emit_mutable(&kb->events.keymap, kb);
return true;
err:
@@ -266,7 +265,7 @@ void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate,
}
kb->repeat_info.rate = rate;
kb->repeat_info.delay = delay;
- wlr_signal_emit_safe(&kb->events.repeat_info, kb);
+ wl_signal_emit_mutable(&kb->events.repeat_info, kb);
}
uint32_t wlr_keyboard_get_modifiers(struct wlr_keyboard *kb) {
diff --git a/types/wlr_keyboard_group.c b/types/wlr_keyboard_group.c
index 5261c141..26354584 100644
--- a/types/wlr_keyboard_group.c
+++ b/types/wlr_keyboard_group.c
@@ -7,7 +7,6 @@
#include <wayland-server-protocol.h>
#include <xkbcommon/xkbcommon.h>
#include "types/wlr_keyboard.h"
-#include "util/signal.h"
#include "wlr/interfaces/wlr_keyboard.h"
#include "wlr/types/wlr_keyboard.h"
#include "wlr/types/wlr_keyboard_group.h"
@@ -212,9 +211,9 @@ static void refresh_state(struct keyboard_group_device *device,
// If there are any unique keys, emit the enter/leave event
if (keys.size > 0) {
if (state == WL_KEYBOARD_KEY_STATE_PRESSED) {
- wlr_signal_emit_safe(&device->keyboard->group->events.enter, &keys);
+ wl_signal_emit_mutable(&device->keyboard->group->events.enter, &keys);
} else {
- wlr_signal_emit_safe(&device->keyboard->group->events.leave, &keys);
+ wl_signal_emit_mutable(&device->keyboard->group->events.leave, &keys);
}
}
diff --git a/types/wlr_keyboard_shortcuts_inhibit_v1.c b/types/wlr_keyboard_shortcuts_inhibit_v1.c
index 247d350d..cc9bac14 100644
--- a/types/wlr_keyboard_shortcuts_inhibit_v1.c
+++ b/types/wlr_keyboard_shortcuts_inhibit_v1.c
@@ -1,6 +1,5 @@
#include <assert.h>
#include <stdlib.h>
-#include <util/signal.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_keyboard_shortcuts_inhibit_v1.h>
#include "keyboard-shortcuts-inhibit-unstable-v1-protocol.h"
@@ -35,7 +34,7 @@ static void keyboard_shortcuts_inhibitor_v1_destroy(
return;
}
- wlr_signal_emit_safe(&inhibitor->events.destroy, inhibitor);
+ wl_signal_emit_mutable(&inhibitor->events.destroy, inhibitor);
wl_resource_set_user_data(inhibitor->resource, NULL);
wl_list_remove(&inhibitor->link);
@@ -144,7 +143,7 @@ static void manager_handle_inhibit_shortcuts(struct wl_client *client,
keyboard_shortcuts_inhibitor_v1_handle_resource_destroy);
wl_list_insert(&manager->inhibitors, &inhibitor->link);
- wlr_signal_emit_safe(&manager->events.new_inhibitor, inhibitor);
+ wl_signal_emit_mutable(&manager->events.new_inhibitor, inhibitor);
}
static void manager_handle_destroy(struct wl_client *client,
@@ -161,7 +160,7 @@ keyboard_shortcuts_inhibit_impl = {
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_keyboard_shortcuts_inhibit_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_layer_shell_v1.c b/types/wlr_layer_shell_v1.c
index daee6290..f21ae799 100644
--- a/types/wlr_layer_shell_v1.c
+++ b/types/wlr_layer_shell_v1.c
@@ -8,7 +8,6 @@
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-layer-shell-unstable-v1-protocol.h"
#define LAYER_SHELL_VERSION 4
@@ -223,7 +222,7 @@ static void layer_surface_handle_get_popup(struct wl_client *client,
}
popup->parent = parent->surface;
wl_list_insert(&parent->popups, &popup->link);
- wlr_signal_emit_safe(&parent->events.new_popup, popup);
+ wl_signal_emit_mutable(&parent->events.new_popup, popup);
}
static void layer_surface_set_layer(struct wl_client *client,
@@ -265,7 +264,7 @@ static void layer_surface_unmap(struct wlr_layer_surface_v1 *surface) {
surface->configured = surface->mapped = false;
// TODO: probably need to ungrab before this event
- wlr_signal_emit_safe(&surface->events.unmap, surface);
+ wl_signal_emit_mutable(&surface->events.unmap, surface);
struct wlr_xdg_popup *popup, *popup_tmp;
wl_list_for_each_safe(popup, popup_tmp, &surface->popups, link) {
@@ -283,7 +282,7 @@ static void layer_surface_destroy(struct wlr_layer_surface_v1 *surface) {
if (surface->configured && surface->mapped) {
layer_surface_unmap(surface);
}
- wlr_signal_emit_safe(&surface->events.destroy, surface);
+ wl_signal_emit_mutable(&surface->events.destroy, surface);
wl_resource_set_user_data(surface->resource, NULL);
surface->surface->role_data = NULL;
wl_list_remove(&surface->surface_destroy.link);
@@ -365,7 +364,7 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) {
surface->added = true;
assert(!surface->configured);
assert(!surface->mapped);
- wlr_signal_emit_safe(&surface->shell->events.new_surface, surface);
+ wl_signal_emit_mutable(&surface->shell->events.new_surface, surface);
// Return early here as the compositor may have closed this layer surface
// in response to the new_surface event.
return;
@@ -374,7 +373,7 @@ static void layer_surface_role_commit(struct wlr_surface *wlr_surface) {
if (surface->configured && wlr_surface_has_buffer(surface->surface) &&
!surface->mapped) {
surface->mapped = true;
- wlr_signal_emit_safe(&surface->events.map, surface);
+ wl_signal_emit_mutable(&surface->events.map, surface);
}
}
@@ -501,7 +500,7 @@ static void layer_shell_bind(struct wl_client *wl_client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_layer_shell_v1 *layer_shell =
wl_container_of(listener, layer_shell, display_destroy);
- wlr_signal_emit_safe(&layer_shell->events.destroy, layer_shell);
+ wl_signal_emit_mutable(&layer_shell->events.destroy, layer_shell);
wl_list_remove(&layer_shell->display_destroy.link);
wl_global_destroy(layer_shell->global);
free(layer_shell);
diff --git a/types/wlr_linux_dmabuf_v1.c b/types/wlr_linux_dmabuf_v1.c
index a124d521..7480b9e1 100644
--- a/types/wlr_linux_dmabuf_v1.c
+++ b/types/wlr_linux_dmabuf_v1.c
@@ -11,7 +11,6 @@
#include <wlr/util/log.h>
#include "linux-dmabuf-unstable-v1-protocol.h"
#include "render/drm_format_set.h"
-#include "util/signal.h"
#include "util/shm.h"
#define LINUX_DMABUF_VERSION 4
@@ -887,7 +886,7 @@ static void linux_dmabuf_bind(struct wl_client *client, void *data,
}
static void linux_dmabuf_v1_destroy(struct wlr_linux_dmabuf_v1 *linux_dmabuf) {
- wlr_signal_emit_safe(&linux_dmabuf->events.destroy, linux_dmabuf);
+ wl_signal_emit_mutable(&linux_dmabuf->events.destroy, linux_dmabuf);
struct wlr_linux_dmabuf_v1_surface *surface, *surface_tmp;
wl_list_for_each_safe(surface, surface_tmp, &linux_dmabuf->surfaces, link) {
diff --git a/types/wlr_output_damage.c b/types/wlr_output_damage.c
index 0dfc30ca..8254f65e 100644
--- a/types/wlr_output_damage.c
+++ b/types/wlr_output_damage.c
@@ -5,7 +5,6 @@
#include <wlr/types/wlr_output_damage.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/box.h>
-#include "util/signal.h"
static void output_handle_destroy(struct wl_listener *listener, void *data) {
struct wlr_output_damage *output_damage =
@@ -41,7 +40,7 @@ static void output_handle_frame(struct wl_listener *listener, void *data) {
return;
}
- wlr_signal_emit_safe(&output_damage->events.frame, output_damage);
+ wl_signal_emit_mutable(&output_damage->events.frame, output_damage);
}
static void output_handle_precommit(struct wl_listener *listener, void *data) {
@@ -128,7 +127,7 @@ void wlr_output_damage_destroy(struct wlr_output_damage *output_damage) {
if (output_damage == NULL) {
return;
}
- wlr_signal_emit_safe(&output_damage->events.destroy, output_damage);
+ wl_signal_emit_mutable(&output_damage->events.destroy, output_damage);
wl_list_remove(&output_damage->output_destroy.link);
wl_list_remove(&output_damage->output_mode.link);
wl_list_remove(&output_damage->output_needs_frame.link);
diff --git a/types/wlr_output_layout.c b/types/wlr_output_layout.c
index ef6e2850..319b7cf7 100644
--- a/types/wlr_output_layout.c
+++ b/types/wlr_output_layout.c
@@ -6,7 +6,6 @@
#include <wlr/types/wlr_output.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
struct wlr_output_layout_output_state {
struct wlr_output_layout *layout;
@@ -37,7 +36,7 @@ struct wlr_output_layout *wlr_output_layout_create(void) {
static void output_layout_output_destroy(
struct wlr_output_layout_output *l_output) {
- wlr_signal_emit_safe(&l_output->events.destroy, l_output);
+ wl_signal_emit_mutable(&l_output->events.destroy, l_output);
wlr_output_destroy_global(l_output->output);
wl_list_remove(&l_output->state->mode.link);
wl_list_remove(&l_output->state->commit.link);
@@ -52,7 +51,7 @@ void wlr_output_layout_destroy(struct wlr_output_layout *layout) {
return;
}
- wlr_signal_emit_safe(&layout->events.destroy, layout);
+ wl_signal_emit_mutable(&layout->events.destroy, layout);
struct wlr_output_layout_output *l_output, *temp;
wl_list_for_each_safe(l_output, temp, &layout->outputs, link) {
@@ -115,7 +114,7 @@ static void output_layout_reconfigure(struct wlr_output_layout *layout) {
max_x += output_box.width;
}
- wlr_signal_emit_safe(&layout->events.change, layout);
+ wl_signal_emit_mutable(&layout->events.change, layout);
}
static void output_update_global(struct wlr_output *output) {
@@ -211,7 +210,7 @@ void wlr_output_layout_add(struct wlr_output_layout *layout,
output_update_global(output);
if (is_new) {
- wlr_signal_emit_safe(&layout->events.add, l_output);
+ wl_signal_emit_mutable(&layout->events.add, l_output);
}
}
@@ -425,7 +424,7 @@ void wlr_output_layout_add_auto(struct wlr_output_layout *layout,
output_update_global(output);
if (is_new) {
- wlr_signal_emit_safe(&layout->events.add, l_output);
+ wl_signal_emit_mutable(&layout->events.add, l_output);
}
}
diff --git a/types/wlr_output_management_v1.c b/types/wlr_output_management_v1.c
index c44352f1..64eff211 100644
--- a/types/wlr_output_management_v1.c
+++ b/types/wlr_output_management_v1.c
@@ -3,7 +3,6 @@
#include <stdlib.h>
#include <wlr/types/wlr_output_management_v1.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-output-management-unstable-v1-protocol.h"
#define OUTPUT_MANAGER_VERSION 2
@@ -413,7 +412,7 @@ static void config_handle_apply(struct wl_client *client,
return;
}
- wlr_signal_emit_safe(&config->manager->events.apply, config);
+ wl_signal_emit_mutable(&config->manager->events.apply, config);
}
static void config_handle_test(struct wl_client *client,
@@ -432,7 +431,7 @@ static void config_handle_test(struct wl_client *client,
return;
}
- wlr_signal_emit_safe(&config->manager->events.test, config);
+ wl_signal_emit_mutable(&config->manager->events.test, config);
}
static void config_handle_destroy(struct wl_client *client,
@@ -589,7 +588,7 @@ static void manager_handle_display_destroy(struct wl_listener *listener,
void *data) {
struct wlr_output_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
struct wlr_output_head_v1 *head, *tmp;
wl_list_for_each_safe(head, tmp, &manager->heads, link) {
diff --git a/types/wlr_output_power_management_v1.c b/types/wlr_output_power_management_v1.c
index e607eb16..7e4d1b3f 100644
--- a/types/wlr_output_power_management_v1.c
+++ b/types/wlr_output_power_management_v1.c
@@ -7,7 +7,6 @@
#include <wlr/types/wlr_output_power_management_v1.h>
#include <wlr/types/wlr_output.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-output-power-management-unstable-v1-protocol.h"
#define OUTPUT_POWER_MANAGER_V1_VERSION 1
@@ -93,7 +92,7 @@ static void output_power_handle_set_mode(struct wl_client *client,
.output = output_power->output,
.mode = mode,
};
- wlr_signal_emit_safe(&output_power->manager->events.set_mode, &event);
+ wl_signal_emit_mutable(&output_power->manager->events.set_mode, &event);
}
static const struct zwlr_output_power_v1_interface output_power_impl = {
@@ -196,7 +195,7 @@ static void output_power_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_output_power_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_global_destroy(manager->global);
free(manager);
}
diff --git a/types/wlr_pointer_constraints_v1.c b/types/wlr_pointer_constraints_v1.c
index e90daf72..7a8d209b 100644
--- a/types/wlr_pointer_constraints_v1.c
+++ b/types/wlr_pointer_constraints_v1.c
@@ -9,7 +9,6 @@
#include <wlr/types/wlr_region.h>
#include <wlr/util/box.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
static const struct zwp_locked_pointer_v1_interface locked_pointer_impl;
static const struct zwp_confined_pointer_v1_interface confined_pointer_impl;
@@ -47,7 +46,7 @@ static void pointer_constraint_destroy(struct wlr_pointer_constraint_v1 *constra
wlr_log(WLR_DEBUG, "destroying constraint %p", constraint);
- wlr_signal_emit_safe(&constraint->events.destroy, constraint);
+ wl_signal_emit_mutable(&constraint->events.destroy, constraint);
wl_resource_set_user_data(constraint->resource, NULL);
wl_list_remove(&constraint->link);
@@ -130,7 +129,7 @@ static void pointer_constraint_commit(
}
if (updated_region) {
- wlr_signal_emit_safe(&constraint->events.set_region, NULL);
+ wl_signal_emit_mutable(&constraint->events.set_region, NULL);
}
}
@@ -246,7 +245,7 @@ static void pointer_constraint_create(struct wl_client *client,
wl_list_insert(&pointer_constraints->constraints, &constraint->link);
- wlr_signal_emit_safe(&pointer_constraints->events.new_constraint,
+ wl_signal_emit_mutable(&pointer_constraints->events.new_constraint,
constraint);
}
diff --git a/types/wlr_pointer_gestures_v1.c b/types/wlr_pointer_gestures_v1.c
index b3f874c9..9089b480 100644
--- a/types/wlr_pointer_gestures_v1.c
+++ b/types/wlr_pointer_gestures_v1.c
@@ -9,7 +9,6 @@
#include <wlr/types/wlr_pointer.h>
#include <wlr/types/wlr_pointer_gestures_v1.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "pointer-gestures-unstable-v1-protocol.h"
#define POINTER_GESTURES_VERSION 3
diff --git a/types/wlr_presentation_time.c b/types/wlr_presentation_time.c
index a6facbdb..11531531 100644
--- a/types/wlr_presentation_time.c
+++ b/types/wlr_presentation_time.c
@@ -7,7 +7,6 @@
#include <wlr/types/wlr_presentation_time.h>
#include <wlr/util/addon.h>
#include "presentation-time-protocol.h"
-#include "util/signal.h"
#define PRESENTATION_VERSION 1
@@ -173,7 +172,7 @@ static void presentation_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_presentation *presentation =
wl_container_of(listener, presentation, display_destroy);
- wlr_signal_emit_safe(&presentation->events.destroy, presentation);
+ wl_signal_emit_mutable(&presentation->events.destroy, presentation);
wl_list_remove(&presentation->display_destroy.link);
wl_global_destroy(presentation->global);
free(presentation);
diff --git a/types/wlr_primary_selection.c b/types/wlr_primary_selection.c
index 21784aae..d576bf0a 100644
--- a/types/wlr_primary_selection.c
+++ b/types/wlr_primary_selection.c
@@ -2,7 +2,6 @@
#include <stdlib.h>
#include <wlr/types/wlr_primary_selection.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
void wlr_primary_selection_source_init(
struct wlr_primary_selection_source *source,
@@ -20,7 +19,7 @@ void wlr_primary_selection_source_destroy(
return;
}
- wlr_signal_emit_safe(&source->events.destroy, source);
+ wl_signal_emit_mutable(&source->events.destroy, source);
char **p;
wl_array_for_each(p, &source->mime_types) {
@@ -63,7 +62,7 @@ void wlr_seat_request_set_primary_selection(struct wlr_seat *seat,
.source = source,
.serial = serial,
};
- wlr_signal_emit_safe(&seat->events.request_set_primary_selection, &event);
+ wl_signal_emit_mutable(&seat->events.request_set_primary_selection, &event);
}
static void seat_handle_primary_selection_source_destroy(
@@ -72,7 +71,7 @@ static void seat_handle_primary_selection_source_destroy(
wl_container_of(listener, seat, primary_selection_source_destroy);
wl_list_remove(&seat->primary_selection_source_destroy.link);
seat->primary_selection_source = NULL;
- wlr_signal_emit_safe(&seat->events.set_primary_selection, seat);
+ wl_signal_emit_mutable(&seat->events.set_primary_selection, seat);
}
void wlr_seat_set_primary_selection(struct wlr_seat *seat,
@@ -98,5 +97,5 @@ void wlr_seat_set_primary_selection(struct wlr_seat *seat,
&seat->primary_selection_source_destroy);
}
- wlr_signal_emit_safe(&seat->events.set_primary_selection, seat);
+ wl_signal_emit_mutable(&seat->events.set_primary_selection, seat);
}
diff --git a/types/wlr_primary_selection_v1.c b/types/wlr_primary_selection_v1.c
index 009b0955..511d5ddb 100644
--- a/types/wlr_primary_selection_v1.c
+++ b/types/wlr_primary_selection_v1.c
@@ -9,7 +9,6 @@
#include <wlr/types/wlr_seat.h>
#include <wlr/util/log.h>
#include "primary-selection-unstable-v1-protocol.h"
-#include "util/signal.h"
#define DEVICE_MANAGER_VERSION 1
@@ -458,7 +457,7 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
device_destroy(device);
}
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_relative_pointer_v1.c b/types/wlr_relative_pointer_v1.c
index 50871b51..44da791f 100644
--- a/types/wlr_relative_pointer_v1.c
+++ b/types/wlr_relative_pointer_v1.c
@@ -1,7 +1,6 @@
#include <assert.h>
#include <inttypes.h>
#include <stdlib.h>
-#include <util/signal.h>
#include <wayland-server-core.h>
#include <wayland-util.h>
#include <wlr/types/wlr_relative_pointer_v1.h>
@@ -27,7 +26,7 @@ static struct wlr_relative_pointer_manager_v1 *relative_pointer_manager_from_res
}
static void relative_pointer_destroy(struct wlr_relative_pointer_v1 *relative_pointer) {
- wlr_signal_emit_safe(&relative_pointer->events.destroy, relative_pointer);
+ wl_signal_emit_mutable(&relative_pointer->events.destroy, relative_pointer);
wl_list_remove(&relative_pointer->link);
wl_list_remove(&relative_pointer->seat_destroy.link);
@@ -118,7 +117,7 @@ static void relative_pointer_manager_v1_handle_get_relative_pointer(struct wl_cl
&relative_pointer->pointer_destroy);
relative_pointer->pointer_destroy.notify = relative_pointer_handle_pointer_destroy;
- wlr_signal_emit_safe(&manager->events.new_relative_pointer,
+ wl_signal_emit_mutable(&manager->events.new_relative_pointer,
relative_pointer);
}
@@ -140,7 +139,7 @@ static void relative_pointer_manager_v1_bind(struct wl_client *wl_client, void *
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_relative_pointer_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy_listener);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy_listener.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_screencopy_v1.c b/types/wlr_screencopy_v1.c
index 0b48fe3f..30e529a9 100644
--- a/types/wlr_screencopy_v1.c
+++ b/types/wlr_screencopy_v1.c
@@ -12,7 +12,6 @@
#include <wlr/util/log.h>
#include "wlr-screencopy-unstable-v1-protocol.h"
#include "render/pixel_format.h"
-#include "util/signal.h"
#define SCREENCOPY_MANAGER_VERSION 3
@@ -680,7 +679,7 @@ failure:
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_screencopy_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_server_decoration.c b/types/wlr_server_decoration.c
index a8079393..425230ec 100644
--- a/types/wlr_server_decoration.c
+++ b/types/wlr_server_decoration.c
@@ -4,7 +4,6 @@
#include <wlr/types/wlr_server_decoration.h>
#include <wlr/util/log.h>
#include "server-decoration-protocol.h"
-#include "util/signal.h"
static const struct org_kde_kwin_server_decoration_interface
server_decoration_impl;
@@ -29,14 +28,14 @@ static void server_decoration_handle_request_mode(struct wl_client *client,
return;
}
decoration->mode = mode;
- wlr_signal_emit_safe(&decoration->events.mode, decoration);
+ wl_signal_emit_mutable(&decoration->events.mode, decoration);
org_kde_kwin_server_decoration_send_mode(decoration->resource,
decoration->mode);
}
static void server_decoration_destroy(
struct wlr_server_decoration *decoration) {
- wlr_signal_emit_safe(&decoration->events.destroy, decoration);
+ wl_signal_emit_mutable(&decoration->events.destroy, decoration);
wl_list_remove(&decoration->surface_destroy_listener.link);
wl_resource_set_user_data(decoration->resource, NULL);
wl_list_remove(&decoration->link);
@@ -119,7 +118,7 @@ static void server_decoration_manager_handle_create(struct wl_client *client,
org_kde_kwin_server_decoration_send_mode(decoration->resource,
decoration->mode);
- wlr_signal_emit_safe(&manager->events.new_decoration, decoration);
+ wl_signal_emit_mutable(&manager->events.new_decoration, decoration);
}
static const struct org_kde_kwin_server_decoration_manager_interface
@@ -166,7 +165,7 @@ static void server_decoration_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_server_decoration_manager *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_session_lock_v1.c b/types/wlr_session_lock_v1.c
index ffba2061..294b4a87 100644
--- a/types/wlr_session_lock_v1.c
+++ b/types/wlr_session_lock_v1.c
@@ -6,7 +6,6 @@
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "ext-session-lock-v1-protocol.h"
#define SESSION_LOCK_VERSION 1
@@ -157,7 +156,7 @@ static void lock_surface_role_commit(struct wlr_surface *surface) {
if (!lock_surface->mapped) {
lock_surface->mapped = true;
- wlr_signal_emit_safe(&lock_surface->events.map, NULL);
+ wl_signal_emit_mutable(&lock_surface->events.map, NULL);
}
}
@@ -185,7 +184,7 @@ static const struct wlr_surface_role lock_surface_role = {
static void lock_surface_destroy(
struct wlr_session_lock_surface_v1 *lock_surface) {
- wlr_signal_emit_safe(&lock_surface->events.destroy, NULL);
+ wl_signal_emit_mutable(&lock_surface->events.destroy, NULL);
wl_list_remove(&lock_surface->link);
@@ -312,7 +311,7 @@ static void lock_handle_get_lock_surface(struct wl_client *client,
wl_signal_add(&surface->events.destroy, &lock_surface->surface_destroy);
lock_surface->surface_destroy.notify = lock_surface_handle_surface_destroy;
- wlr_signal_emit_safe(&lock->events.new_surface, lock_surface);
+ wl_signal_emit_mutable(&lock->events.new_surface, lock_surface);
}
static void lock_handle_unlock_and_destroy(struct wl_client *client,
@@ -322,7 +321,7 @@ static void lock_handle_unlock_and_destroy(struct wl_client *client,
return;
}
- wlr_signal_emit_safe(&lock->events.unlock, NULL);
+ wl_signal_emit_mutable(&lock->events.unlock, NULL);
wl_resource_destroy(lock_resource);
}
@@ -344,7 +343,7 @@ static void lock_destroy(struct wlr_session_lock_v1 *lock) {
}
assert(wl_list_empty(&lock->surfaces));
- wlr_signal_emit_safe(&lock->events.destroy, NULL);
+ wl_signal_emit_mutable(&lock->events.destroy, NULL);
assert(wl_list_empty(&lock->events.new_surface.listener_list));
assert(wl_list_empty(&lock->events.unlock.listener_list));
@@ -395,7 +394,7 @@ static void lock_manager_handle_lock(struct wl_client *client,
wl_resource_set_implementation(lock->resource, &lock_implementation,
lock, lock_resource_destroy);
- wlr_signal_emit_safe(&lock_manager->events.new_lock, lock);
+ wl_signal_emit_mutable(&lock_manager->events.new_lock, lock);
}
static const struct ext_session_lock_manager_v1_interface lock_manager_implementation = {
@@ -420,7 +419,7 @@ static void lock_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_session_lock_manager_v1 *lock_manager =
wl_container_of(listener, lock_manager, display_destroy);
- wlr_signal_emit_safe(&lock_manager->events.destroy, NULL);
+ wl_signal_emit_mutable(&lock_manager->events.destroy, NULL);
wl_list_remove(&lock_manager->display_destroy.link);
wl_global_destroy(lock_manager->global);
diff --git a/types/wlr_subcompositor.c b/types/wlr_subcompositor.c
index 75902cac..530f7476 100644
--- a/types/wlr_subcompositor.c
+++ b/types/wlr_subcompositor.c
@@ -4,7 +4,6 @@
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_subcompositor.h>
#include "types/wlr_region.h"
-#include "util/signal.h"
#define SUBCOMPOSITOR_VERSION 1
@@ -37,7 +36,7 @@ static void subsurface_destroy(struct wlr_subsurface *subsurface) {
subsurface_unmap(subsurface);
- wlr_signal_emit_safe(&subsurface->events.destroy, subsurface);
+ wl_signal_emit_mutable(&subsurface->events.destroy, subsurface);
wl_list_remove(&subsurface->surface_destroy.link);
wl_list_remove(&subsurface->surface_client_commit.link);
@@ -230,7 +229,7 @@ static void subsurface_consider_map(struct wlr_subsurface *subsurface,
// Now we can map the subsurface
subsurface->mapped = true;
- wlr_signal_emit_safe(&subsurface->events.map, subsurface);
+ wl_signal_emit_mutable(&subsurface->events.map, subsurface);
// Try mapping all children too
struct wlr_subsurface *child;
@@ -250,7 +249,7 @@ static void subsurface_unmap(struct wlr_subsurface *subsurface) {
}
subsurface->mapped = false;
- wlr_signal_emit_safe(&subsurface->events.unmap, subsurface);
+ wl_signal_emit_mutable(&subsurface->events.unmap, subsurface);
// Unmap all children
struct wlr_subsurface *child;
@@ -458,7 +457,7 @@ static void subcompositor_handle_display_destroy(
struct wl_listener *listener, void *data) {
struct wlr_subcompositor *subcompositor =
wl_container_of(listener, subcompositor, display_destroy);
- wlr_signal_emit_safe(&subcompositor->events.destroy, NULL);
+ wl_signal_emit_mutable(&subcompositor->events.destroy, NULL);
wl_list_remove(&subcompositor->display_destroy.link);
wl_global_destroy(subcompositor->global);
free(subcompositor);
diff --git a/types/wlr_text_input_v3.c b/types/wlr_text_input_v3.c
index 65a8ebd6..ca06329e 100644
--- a/types/wlr_text_input_v3.c
+++ b/types/wlr_text_input_v3.c
@@ -8,7 +8,6 @@
#include <wlr/types/wlr_text_input_v3.h>
#include <wlr/util/log.h>
#include "text-input-unstable-v3-protocol.h"
-#include "util/signal.h"
static void text_input_clear_focused_surface(struct wlr_text_input_v3 *text_input) {
wl_list_remove(&text_input->surface_destroy.link);
@@ -66,7 +65,7 @@ void wlr_text_input_v3_send_done(struct wlr_text_input_v3 *text_input) {
}
static void wlr_text_input_destroy(struct wlr_text_input_v3 *text_input) {
- wlr_signal_emit_safe(&text_input->events.destroy, text_input);
+ wl_signal_emit_mutable(&text_input->events.destroy, text_input);
text_input_clear_focused_surface(text_input);
wl_list_remove(&text_input->seat_destroy.link);
// remove from manager::text_inputs
@@ -188,12 +187,12 @@ static void text_input_commit(struct wl_client *client,
if (!old_enabled && text_input->current_enabled) {
text_input->active_features = text_input->current.features;
- wlr_signal_emit_safe(&text_input->events.enable, text_input);
+ wl_signal_emit_mutable(&text_input->events.enable, text_input);
} else if (old_enabled && !text_input->current_enabled) {
text_input->active_features = 0;
- wlr_signal_emit_safe(&text_input->events.disable, text_input);
+ wl_signal_emit_mutable(&text_input->events.disable, text_input);
} else { // including never enabled
- wlr_signal_emit_safe(&text_input->events.commit, text_input);
+ wl_signal_emit_mutable(&text_input->events.commit, text_input);
}
}
@@ -280,7 +279,7 @@ static void text_input_manager_get_text_input(struct wl_client *client,
text_input_manager_from_resource(resource);
wl_list_insert(&manager->text_inputs, &text_input->link);
- wlr_signal_emit_safe(&manager->events.text_input, text_input);
+ wl_signal_emit_mutable(&manager->events.text_input, text_input);
}
static const struct zwp_text_input_manager_v3_interface
@@ -307,7 +306,7 @@ static void text_input_manager_bind(struct wl_client *wl_client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_text_input_manager_v3 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_viewporter.c b/types/wlr_viewporter.c
index 097af857..504390e7 100644
--- a/types/wlr_viewporter.c
+++ b/types/wlr_viewporter.c
@@ -3,7 +3,6 @@
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_viewporter.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "viewporter-protocol.h"
#define VIEWPORTER_VERSION 1
@@ -211,7 +210,7 @@ static void viewporter_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_viewporter *viewporter =
wl_container_of(listener, viewporter, display_destroy);
- wlr_signal_emit_safe(&viewporter->events.destroy, NULL);
+ wl_signal_emit_mutable(&viewporter->events.destroy, NULL);
wl_global_destroy(viewporter->global);
free(viewporter);
}
diff --git a/types/wlr_virtual_keyboard_v1.c b/types/wlr_virtual_keyboard_v1.c
index 2d313575..9b90ec9f 100644
--- a/types/wlr_virtual_keyboard_v1.c
+++ b/types/wlr_virtual_keyboard_v1.c
@@ -8,7 +8,6 @@
#include <wlr/types/wlr_virtual_keyboard_v1.h>
#include <wlr/util/log.h>
#include <xkbcommon/xkbcommon.h>
-#include "util/signal.h"
#include "virtual-keyboard-unstable-v1-protocol.h"
static const struct wlr_keyboard_impl keyboard_impl = {
@@ -176,7 +175,7 @@ static void virtual_keyboard_manager_create_virtual_keyboard(
wl_list_insert(&manager->virtual_keyboards, &virtual_keyboard->link);
- wlr_signal_emit_safe(&manager->events.new_virtual_keyboard,
+ wl_signal_emit_mutable(&manager->events.new_virtual_keyboard,
virtual_keyboard);
}
@@ -201,7 +200,7 @@ static void virtual_keyboard_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_virtual_keyboard_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_virtual_pointer_v1.c b/types/wlr_virtual_pointer_v1.c
index f1fea0f0..f4dd60c1 100644
--- a/types/wlr_virtual_pointer_v1.c
+++ b/types/wlr_virtual_pointer_v1.c
@@ -5,7 +5,6 @@
#include <wlr/types/wlr_virtual_pointer_v1.h>
#include <wlr/types/wlr_pointer.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "wlr-virtual-pointer-unstable-v1-protocol.h"
static const struct wlr_pointer_impl pointer_impl = {
@@ -37,7 +36,7 @@ static void virtual_pointer_motion(struct wl_client *client,
.unaccel_dx = wl_fixed_to_double(dx),
.unaccel_dy = wl_fixed_to_double(dy),
};
- wlr_signal_emit_safe(&pointer->pointer.events.motion, &event);
+ wl_signal_emit_mutable(&pointer->pointer.events.motion, &event);
}
static void virtual_pointer_motion_absolute(struct wl_client *client,
@@ -57,7 +56,7 @@ static void virtual_pointer_motion_absolute(struct wl_client *client,
.x = (double)x / x_extent,
.y = (double)y / y_extent,
};
- wlr_signal_emit_safe(&pointer->pointer.events.motion_absolute, &event);
+ wl_signal_emit_mutable(&pointer->pointer.events.motion_absolute, &event);
}
static void virtual_pointer_button(struct wl_client *client,
@@ -74,7 +73,7 @@ static void virtual_pointer_button(struct wl_client *client,
.button = button,
.state = state ? WLR_BUTTON_PRESSED : WLR_BUTTON_RELEASED
};
- wlr_signal_emit_safe(&pointer->pointer.events.button, &event);
+ wl_signal_emit_mutable(&pointer->pointer.events.button, &event);
}
static void virtual_pointer_axis(struct wl_client *client,
@@ -112,14 +111,14 @@ static void virtual_pointer_frame(struct wl_client *client,
++i) {
if (pointer->axis_valid[i]) {
/* Deliver pending axis event */
- wlr_signal_emit_safe(&pointer->pointer.events.axis,
+ wl_signal_emit_mutable(&pointer->pointer.events.axis,
&pointer->axis_event[i]);
memset(&pointer->axis_event[i], 0, sizeof(pointer->axis_event[i]));
pointer->axis_valid[i] = false;
}
}
- wlr_signal_emit_safe(&pointer->pointer.events.frame, &pointer->pointer);
+ wl_signal_emit_mutable(&pointer->pointer.events.frame, &pointer->pointer);
}
static void virtual_pointer_axis_source(struct wl_client *client,
@@ -270,7 +269,7 @@ static void virtual_pointer_manager_create_virtual_pointer_with_output(
virtual_pointer->resource = pointer_resource;
wl_list_insert(&manager->virtual_pointers, &virtual_pointer->link);
- wlr_signal_emit_safe(&manager->events.new_virtual_pointer, &event);
+ wl_signal_emit_mutable(&manager->events.new_virtual_pointer, &event);
}
static void virtual_pointer_manager_create_virtual_pointer(
@@ -308,7 +307,7 @@ static void virtual_pointer_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_virtual_pointer_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
struct wlr_virtual_pointer_v1 *pointer, *pointer_tmp;
diff --git a/types/wlr_xdg_activation_v1.c b/types/wlr_xdg_activation_v1.c
index c54364cc..eb8b930c 100644
--- a/types/wlr_xdg_activation_v1.c
+++ b/types/wlr_xdg_activation_v1.c
@@ -6,7 +6,6 @@
#include <wlr/types/wlr_seat.h>
#include <wlr/types/wlr_xdg_activation_v1.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "util/token.h"
#include "xdg-activation-v1-protocol.h"
@@ -33,7 +32,7 @@ void wlr_xdg_activation_token_v1_destroy(
wl_event_source_remove(token->timeout);
}
- wlr_signal_emit_safe(&token->events.destroy, NULL);
+ wl_signal_emit_mutable(&token->events.destroy, NULL);
wl_list_remove(&token->link);
wl_list_remove(&token->seat_destroy.link);
@@ -312,7 +311,7 @@ static void activation_handle_activate(struct wl_client *client,
.token = token,
.surface = surface,
};
- wlr_signal_emit_safe(&activation->events.request_activate, &event);
+ wl_signal_emit_mutable(&activation->events.request_activate, &event);
wlr_xdg_activation_token_v1_destroy(token);
}
@@ -339,7 +338,7 @@ static void activation_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_xdg_activation_v1 *activation =
wl_container_of(listener, activation, display_destroy);
- wlr_signal_emit_safe(&activation->events.destroy, NULL);
+ wl_signal_emit_mutable(&activation->events.destroy, NULL);
struct wlr_xdg_activation_token_v1 *token, *token_tmp;
wl_list_for_each_safe(token, token_tmp, &activation->tokens, link) {
diff --git a/types/wlr_xdg_decoration_v1.c b/types/wlr_xdg_decoration_v1.c
index d0f969f4..fcd97a5c 100644
--- a/types/wlr_xdg_decoration_v1.c
+++ b/types/wlr_xdg_decoration_v1.c
@@ -3,7 +3,6 @@
#include <stdlib.h>
#include <wlr/types/wlr_xdg_decoration_v1.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "xdg-decoration-unstable-v1-protocol.h"
#define DECORATION_MANAGER_VERSION 1
@@ -31,7 +30,7 @@ static void toplevel_decoration_handle_set_mode(struct wl_client *client,
decoration->requested_mode =
(enum wlr_xdg_toplevel_decoration_v1_mode)mode;
- wlr_signal_emit_safe(&decoration->events.request_mode, decoration);
+ wl_signal_emit_mutable(&decoration->events.request_mode, decoration);
}
static void toplevel_decoration_handle_unset_mode(struct wl_client *client,
@@ -40,7 +39,7 @@ static void toplevel_decoration_handle_unset_mode(struct wl_client *client,
toplevel_decoration_from_resource(resource);
decoration->requested_mode = WLR_XDG_TOPLEVEL_DECORATION_V1_MODE_NONE;
- wlr_signal_emit_safe(&decoration->events.request_mode, decoration);
+ wl_signal_emit_mutable(&decoration->events.request_mode, decoration);
}
static const struct zxdg_toplevel_decoration_v1_interface
@@ -62,7 +61,7 @@ static void toplevel_decoration_handle_resource_destroy(
struct wl_resource *resource) {
struct wlr_xdg_toplevel_decoration_v1 *decoration =
toplevel_decoration_from_resource(resource);
- wlr_signal_emit_safe(&decoration->events.destroy, decoration);
+ wl_signal_emit_mutable(&decoration->events.destroy, decoration);
wl_list_remove(&decoration->surface_commit.link);
wl_list_remove(&decoration->surface_destroy.link);
wl_list_remove(&decoration->surface_configure.link);
@@ -148,7 +147,7 @@ static void toplevel_decoration_handle_surface_commit(
if (decoration->surface->added && !decoration->added) {
decoration->added = true;
- wlr_signal_emit_safe(&manager->events.new_toplevel_decoration,
+ wl_signal_emit_mutable(&manager->events.new_toplevel_decoration,
decoration);
}
}
@@ -232,7 +231,7 @@ static void decoration_manager_handle_get_toplevel_decoration(
if (toplevel->base->added) {
decoration->added = true;
- wlr_signal_emit_safe(&manager->events.new_toplevel_decoration,
+ wl_signal_emit_mutable(&manager->events.new_toplevel_decoration,
decoration);
}
}
@@ -260,7 +259,7 @@ static void decoration_manager_bind(struct wl_client *client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_xdg_decoration_manager_v1 *manager =
wl_container_of(listener, manager, display_destroy);
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_global_destroy(manager->global);
free(manager);
diff --git a/types/wlr_xdg_foreign_registry.c b/types/wlr_xdg_foreign_registry.c
index 0b75e593..c27d8406 100644
--- a/types/wlr_xdg_foreign_registry.c
+++ b/types/wlr_xdg_foreign_registry.c
@@ -1,5 +1,4 @@
#include <wlr/types/wlr_xdg_foreign_registry.h>
-#include "util/signal.h"
#include "util/token.h"
#include <assert.h>
#include <stdlib.h>
@@ -38,7 +37,7 @@ struct wlr_xdg_foreign_exported *wlr_xdg_foreign_registry_find_by_handle(
}
void wlr_xdg_foreign_exported_finish(struct wlr_xdg_foreign_exported *surface) {
- wlr_signal_emit_safe(&surface->events.destroy, NULL);
+ wl_signal_emit_mutable(&surface->events.destroy, NULL);
surface->registry = NULL;
wl_list_remove(&surface->link);
wl_list_init(&surface->link);
@@ -49,7 +48,7 @@ static void foreign_registry_handle_display_destroy(struct wl_listener *listener
struct wlr_xdg_foreign_registry *registry =
wl_container_of(listener, registry, display_destroy);
- wlr_signal_emit_safe(&registry->events.destroy, NULL);
+ wl_signal_emit_mutable(&registry->events.destroy, NULL);
// Implementations are supposed to remove all surfaces
assert(wl_list_empty(&registry->exported_surfaces));
diff --git a/types/wlr_xdg_foreign_v1.c b/types/wlr_xdg_foreign_v1.c
index b6e1c0a2..c9391662 100644
--- a/types/wlr_xdg_foreign_v1.c
+++ b/types/wlr_xdg_foreign_v1.c
@@ -6,7 +6,6 @@
#include <wlr/types/wlr_xdg_foreign_v1.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "xdg-foreign-unstable-v1-protocol.h"
#define FOREIGN_V1_VERSION 1
@@ -361,7 +360,7 @@ static void xdg_foreign_destroy(struct wlr_xdg_foreign_v1 *foreign) {
return;
}
- wlr_signal_emit_safe(&foreign->events.destroy, NULL);
+ wl_signal_emit_mutable(&foreign->events.destroy, NULL);
wl_list_remove(&foreign->foreign_registry_destroy.link);
wl_list_remove(&foreign->display_destroy.link);
diff --git a/types/wlr_xdg_foreign_v2.c b/types/wlr_xdg_foreign_v2.c
index 28efff14..8d256723 100644
--- a/types/wlr_xdg_foreign_v2.c
+++ b/types/wlr_xdg_foreign_v2.c
@@ -6,7 +6,6 @@
#include <wlr/types/wlr_xdg_foreign_v2.h>
#include <wlr/types/wlr_xdg_shell.h>
#include <wlr/util/log.h>
-#include "util/signal.h"
#include "xdg-foreign-unstable-v2-protocol.h"
#define FOREIGN_V2_VERSION 1
@@ -367,7 +366,7 @@ static void xdg_foreign_destroy(struct wlr_xdg_foreign_v2 *foreign) {
return;
}
- wlr_signal_emit_safe(&foreign->events.destroy, NULL);
+ wl_signal_emit_mutable(&foreign->events.destroy, NULL);
wl_list_remove(&foreign->foreign_registry_destroy.link);
wl_list_remove(&foreign->display_destroy.link);
diff --git a/types/wlr_xdg_output_v1.c b/types/wlr_xdg_output_v1.c
index 8d5fee48..062bf6e6 100644
--- a/types/wlr_xdg_output_v1.c
+++ b/types/wlr_xdg_output_v1.c
@@ -6,7 +6,6 @@
#include <wlr/types/wlr_xdg_output_v1.h>
#include <wlr/util/log.h>
#include "xdg-output-unstable-v1-protocol.h"
-#include "util/signal.h"
#define OUTPUT_MANAGER_VERSION 3
#define OUTPUT_DONE_DEPRECATED_SINCE_VERSION 3
@@ -231,7 +230,7 @@ static void manager_destroy(struct wlr_xdg_output_manager_v1 *manager) {
wl_list_for_each_safe(output, tmp, &manager->outputs, link) {
output_destroy(output);
}
- wlr_signal_emit_safe(&manager->events.destroy, manager);
+ wl_signal_emit_mutable(&manager->events.destroy, manager);
wl_list_remove(&manager->display_destroy.link);
wl_list_remove(&manager->layout_add.link);
wl_list_remove(&manager->layout_change.link);
diff --git a/types/xdg_shell/wlr_xdg_popup.c b/types/xdg_shell/wlr_xdg_popup.c
index adf94c03..d0b83201 100644
--- a/types/xdg_shell/wlr_xdg_popup.c
+++ b/types/xdg_shell/wlr_xdg_popup.c
@@ -2,7 +2,6 @@
#include <stdlib.h>
#include <string.h>
#include "types/wlr_xdg_shell.h"
-#include "util/signal.h"
void handle_xdg_popup_ack_configure(
struct wlr_xdg_popup *popup,
@@ -325,7 +324,7 @@ static void xdg_popup_handle_reposition(
wlr_xdg_surface_schedule_configure(popup->base);
- wlr_signal_emit_safe(&popup->events.reposition, NULL);
+ wl_signal_emit_mutable(&popup->events.reposition, NULL);
}
static void xdg_popup_handle_destroy(struct wl_client *client,
@@ -419,7 +418,7 @@ void create_xdg_popup(struct wlr_xdg_surface *surface,
if (parent) {
surface->popup->parent = parent->surface;
wl_list_insert(&parent->popups, &surface->popup->link);
- wlr_signal_emit_safe(&parent->events.new_popup, surface->popup);
+ wl_signal_emit_mutable(&parent->events.new_popup, surface->popup);
} else {
wl_list_init(&surface->popup->link);
}
diff --git a/types/xdg_shell/wlr_xdg_shell.c b/types/xdg_shell/wlr_xdg_shell.c
index 06d11847..69c9a696 100644
--- a/types/xdg_shell/wlr_xdg_shell.c
+++ b/types/xdg_shell/wlr_xdg_shell.c
@@ -1,7 +1,6 @@
#include <assert.h>
#include <stdlib.h>
#include "types/wlr_xdg_shell.h"
-#include "util/signal.h"
#define WM_BASE_VERSION 5
@@ -84,7 +83,7 @@ static int xdg_client_ping_timeout(void *user_data) {
struct wlr_xdg_surface *surface;
wl_list_for_each(surface, &client->surfaces, link) {
- wlr_signal_emit_safe(&surface->events.ping_timeout, NULL);
+ wl_signal_emit_mutable(&surface->events.ping_timeout, NULL);
}
client->ping_serial = 0;
@@ -131,7 +130,7 @@ static void xdg_shell_bind(struct wl_client *wl_client, void *data,
static void handle_display_destroy(struct wl_listener *listener, void *data) {
struct wlr_xdg_shell *xdg_shell =
wl_container_of(listener, xdg_shell, display_destroy);
- wlr_signal_emit_safe(&xdg_shell->events.destroy, xdg_shell);
+ wl_signal_emit_mutable(&xdg_shell->events.destroy, xdg_shell);
wl_list_remove(&xdg_shell->display_destroy.link);
wl_global_destroy(xdg_shell->global);
free(xdg_shell);
diff --git a/types/xdg_shell/wlr_xdg_surface.c b/types/xdg_shell/wlr_xdg_surface.c
index 5c337543..ae0dfcc1 100644
--- a/types/xdg_shell/wlr_xdg_surface.c
+++ b/types/xdg_shell/wlr_xdg_surface.c
@@ -4,7 +4,6 @@
#include <wlr/util/box.h>
#include <wlr/util/log.h>
#include "types/wlr_xdg_shell.h"
-#include "util/signal.h"
bool wlr_surface_is_xdg_surface(struct wlr_surface *surface) {
return surface->role == &xdg_toplevel_surface_role ||
@@ -34,7 +33,7 @@ void unmap_xdg_surface(struct wlr_xdg_surface *surface) {
// TODO: probably need to ungrab before this event
if (surface->mapped) {
surface->mapped = false;
- wlr_signal_emit_safe(&surface->events.unmap, NULL);
+ wl_signal_emit_mutable(&surface->events.unmap, NULL);
}
struct wlr_xdg_popup *popup, *popup_tmp;
@@ -98,7 +97,7 @@ static void xdg_surface_handle_ack_configure(struct wl_client *client,
if (configure->serial == serial) {
break;
}
- wlr_signal_emit_safe(&surface->events.ack_configure, configure);
+ wl_signal_emit_mutable(&surface->events.ack_configure, configure);
xdg_surface_configure_destroy(configure);
}
@@ -119,7 +118,7 @@ static void xdg_surface_handle_ack_configure(struct wl_client *client,
surface->configured = true;
surface->pending.configure_serial = serial;
- wlr_signal_emit_safe(&surface->events.ack_configure, configure);
+ wl_signal_emit_mutable(&surface->events.ack_configure, configure);
xdg_surface_configure_destroy(configure);
}
@@ -153,7 +152,7 @@ static void surface_send_configure(void *user_data) {
break;
}
- wlr_signal_emit_safe(&surface->events.configure, configure);
+ wl_signal_emit_mutable(&surface->events.configure, configure);
xdg_surface_send_configure(surface->resource, configure->serial);
}
@@ -306,13 +305,13 @@ void xdg_surface_role_commit(struct wlr_surface *wlr_surface) {
if (!surface->added) {
surface->added = true;
- wlr_signal_emit_safe(&surface->client->shell->events.new_surface,
+ wl_signal_emit_mutable(&surface->client->shell->events.new_surface,
surface);
}
if (surface->configured && wlr_surface_has_buffer(surface->surface) &&
!surface->mapped) {
surface->mapped = true;
- wlr_signal_emit_safe(&surface->events.map, NULL);
+ wl_signal_emit_mutable(&surface->events.map, NULL);
}
}
@@ -405,7 +404,7 @@ void reset_xdg_surface(struct wlr_xdg_surface *surface) {
}
if (surface->added) {
- wlr_signal_emit_safe(&surface->events.destroy, NULL);
+ wl_signal_emit_mutable(&surface->events.destroy, NULL);
surface->added = false;
}
diff --git a/types/xdg_shell/wlr_xdg_toplevel.c b/types/xdg_shell/wlr_xdg_toplevel.c
index 878b0091..58acec27 100644
--- a/types/xdg_shell/wlr_xdg_toplevel.c
+++ b/types/xdg_shell/wlr_xdg_toplevel.c
@@ -5,7 +5,6 @@
#include <wlr/util/log.h>
#include <wlr/util/edges.h>
#include "types/wlr_xdg_shell.h"
-#include "util/signal.h"
void handle_xdg_toplevel_ack_configure(
struct wlr_xdg_toplevel *toplevel,
@@ -168,7 +167,7 @@ void wlr_xdg_toplevel_set_parent(struct wlr_xdg_toplevel *toplevel,
toplevel->parent = NULL;
}
- wlr_signal_emit_safe(&toplevel->events.set_parent, NULL);
+ wl_signal_emit_mutable(&toplevel->events.set_parent, NULL);
}
static void xdg_toplevel_handle_set_parent(struct wl_client *client,
@@ -198,7 +197,7 @@ static void xdg_toplevel_handle_set_title(struct wl_client *client,
free(toplevel->title);
toplevel->title = tmp;
- wlr_signal_emit_safe(&toplevel->events.set_title, NULL);
+ wl_signal_emit_mutable(&toplevel->events.set_title, NULL);
}
static void xdg_toplevel_handle_set_app_id(struct wl_client *client,
@@ -215,7 +214,7 @@ static void xdg_toplevel_handle_set_app_id(struct wl_client *client,
free(toplevel->app_id);
toplevel->app_id = tmp;
- wlr_signal_emit_safe(&toplevel->events.set_app_id, NULL);
+ wl_signal_emit_mutable(&toplevel->events.set_app_id, NULL);
}
static void xdg_toplevel_handle_show_window_menu(struct wl_client *client,
@@ -246,7 +245,7 @@ static void xdg_toplevel_handle_show_window_menu(struct wl_client *client,
.y = y,
};
- wlr_signal_emit_safe(&toplevel->events.request_show_window_menu, &event);
+ wl_signal_emit_mutable(&toplevel->events.request_show_window_menu, &event);
}
static void xdg_toplevel_handle_move(struct wl_client *client,
@@ -275,7 +274,7 @@ static void xdg_toplevel_handle_move(struct wl_client *client,
.serial = serial,
};
- wlr_signal_emit_safe(&toplevel->events.request_move, &event);
+ wl_signal_emit_mutable(&toplevel->events.request_move, &event);
}
static void xdg_toplevel_handle_resize(struct wl_client *client,
@@ -305,7 +304,7 @@ static void xdg_toplevel_handle_resize(struct wl_client *client,
.edges = edges,
};
- wlr_signal_emit_safe(&toplevel->events.request_resize, &event);
+ wl_signal_emit_mutable(&toplevel->events.request_resize, &event);
}
static void xdg_toplevel_handle_set_max_size(struct wl_client *client,
@@ -329,7 +328,7 @@ static void xdg_toplevel_handle_set_maximized(struct wl_client *client,
struct wlr_xdg_toplevel *toplevel =
wlr_xdg_toplevel_from_resource(resource);
toplevel->requested.maximized = true;
- wlr_signal_emit_safe(&toplevel->events.request_maximize, NULL);
+ wl_signal_emit_mutable(&toplevel->events.request_maximize, NULL);
}
static void xdg_toplevel_handle_unset_maximized(struct wl_client *client,
@@ -337,7 +336,7 @@ static void xdg_toplevel_handle_unset_maximized(struct wl_client *client,
struct wlr_xdg_toplevel *toplevel =
wlr_xdg_toplevel_from_resource(resource);
toplevel->requested.maximized = false;
- wlr_signal_emit_safe(&toplevel->events.request_maximize, NULL);
+ wl_signal_emit_mutable(&toplevel->events.request_maximize, NULL);
}
static void handle_fullscreen_output_destroy(struct wl_listener *listener,
@@ -376,7 +375,7 @@ static void xdg_toplevel_handle_set_fullscreen(struct wl_client *client,
store_fullscreen_requested(toplevel, true, output);
- wlr_signal_emit_safe(&toplevel->events.request_fullscreen, NULL);
+ wl_signal_emit_mutable(&toplevel->events.request_fullscreen, NULL);
}
static void xdg_toplevel_handle_unset_fullscreen(struct wl_client *client,
@@ -386,7 +385,7 @@ static void xdg_toplevel_handle_unset_fullscreen(struct wl_client *client,
store_fullscreen_requested(toplevel, false, NULL);
- wlr_signal_emit_safe(&toplevel->events.request_fullscreen, NULL);
+ wl_signal_emit_mutable(&toplevel->events.request_fullscreen, NULL);
}
static void xdg_toplevel_handle_set_minimized(struct wl_client *client,
@@ -394,7 +393,7 @@ static void xdg_toplevel_handle_set_minimized(struct wl_client *client,
struct wlr_xdg_toplevel *toplevel =
wlr_xdg_toplevel_from_resource(resource);
toplevel->requested.minimized = true;
- wlr_signal_emit_safe(&toplevel->events.request_minimize, NULL);
+ wl_signal_emit_mutable(&toplevel->events.request_minimize, NULL);
}
static void xdg_toplevel_handle_destroy(struct wl_client *client,
diff --git a/xwayland/server.c b/xwayland/server.c
index 0086ad65..75b919b4 100644
--- a/xwayland/server.c
+++ b/xwayland/server.c
@@ -16,7 +16,6 @@
#include <wlr/util/log.h>
#include <wlr/xwayland.h>
#include "sockets.h"
-#include "util/signal.h"
#include "xwayland/config.h"
static void safe_close(int fd) {
@@ -281,7 +280,7 @@ static int xserver_handle_ready(int fd, uint32_t mask, void *data) {
.server = server,
.wm_fd = server->wm_fd[0],
};
- wlr_signal_emit_safe(&server->events.ready, &event);
+ wl_signal_emit_mutable(&server->events.ready, &event);
/* We removed the source, so don't need recheck */
return 0;
@@ -432,7 +431,7 @@ void wlr_xwayland_server_destroy(struct wlr_xwayland_server *server) {
server_finish_process(server);
server_finish_display(server);
- wlr_signal_emit_safe(&server->events.destroy, NULL);
+ wl_signal_emit_mutable(&server->events.destroy, NULL);
free(server);
}
diff --git a/xwayland/xwayland.c b/xwayland/xwayland.c
index cb62fcc1..d76f0eec 100644
--- a/xwayland/xwayland.c
+++ b/xwayland/xwayland.c
@@ -14,7 +14,6 @@
#include <wlr/util/log.h>
#include <wlr/xwayland.h>
#include "sockets.h"
-#include "util/signal.h"
#include "xwayland/xwm.h"
struct wlr_xwayland_cursor {
@@ -54,7 +53,7 @@ static void handle_server_ready(struct wl_listener *listener, void *data) {
cur->height, cur->hotspot_x, cur->hotspot_y);
}
- wlr_signal_emit_safe(&xwayland->events.ready, NULL);
+ wl_signal_emit_mutable(&xwayland->events.ready, NULL);
}
void wlr_xwayland_destroy(struct wlr_xwayland *xwayland) {
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 1bacd1ce..fb9e7f44 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -16,7 +16,6 @@
#include <xcb/render.h>
#include <xcb/res.h>
#include <xcb/xfixes.h>
-#include "util/signal.h"
#include "xwayland/xwm.h"
const char *const atom_map[ATOM_LAST] = {
@@ -125,7 +124,7 @@ static struct wlr_xwayland_surface *lookup_surface(struct wlr_xwm *xwm,
static int xwayland_surface_handle_ping_timeout(void *data) {
struct wlr_xwayland_surface *surface = data;
- wlr_signal_emit_safe(&surface->events.ping_timeout, surface);
+ wl_signal_emit_mutable(&surface->events.ping_timeout, surface);
surface->pinging = false;
return 1;
}
@@ -202,7 +201,7 @@ static struct wlr_xwayland_surface *xwayland_surface_create(
wl_list_insert(&xwm->surfaces, &surface->link);
- wlr_signal_emit_safe(&xwm->xwayland->events.new_surface, surface);
+ wl_signal_emit_mutable(&xwm->xwayland->events.new_surface, surface);
return surface;
}
@@ -390,7 +389,7 @@ static void xwayland_surface_destroy(
struct wlr_xwayland_surface *xsurface) {
xsurface_unmap(xsurface);
- wlr_signal_emit_safe(&xsurface->events.destroy, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.destroy, xsurface);
if (xsurface == xsurface->xwm->focus_surface) {
xwm_surface_activate(xsurface->xwm, NULL);
@@ -456,7 +455,7 @@ static void read_surface_class(struct wlr_xwm *xwm,
surface->class = NULL;
}
- wlr_signal_emit_safe(&surface->events.set_class, surface);
+ wl_signal_emit_mutable(&surface->events.set_class, surface);
}
static void read_surface_startup_id(struct wlr_xwm *xwm,
@@ -479,7 +478,7 @@ static void read_surface_startup_id(struct wlr_xwm *xwm,
wlr_log(WLR_DEBUG, "XCB_ATOM_NET_STARTUP_ID: %s",
xsurface->startup_id ? xsurface->startup_id: "(null)");
- wlr_signal_emit_safe(&xsurface->events.set_startup_id, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_startup_id, xsurface);
}
static void read_surface_role(struct wlr_xwm *xwm,
@@ -500,7 +499,7 @@ static void read_surface_role(struct wlr_xwm *xwm,
xsurface->role = NULL;
}
- wlr_signal_emit_safe(&xsurface->events.set_role, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_role, xsurface);
}
static void read_surface_title(struct wlr_xwm *xwm,
@@ -527,7 +526,7 @@ static void read_surface_title(struct wlr_xwm *xwm,
}
xsurface->has_utf8_title = is_utf8;
- wlr_signal_emit_safe(&xsurface->events.set_title, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_title, xsurface);
}
static bool has_parent(struct wlr_xwayland_surface *parent,
@@ -572,7 +571,7 @@ static void read_surface_parent(struct wlr_xwm *xwm,
wl_list_init(&xsurface->parent_link);
}
- wlr_signal_emit_safe(&xsurface->events.set_parent, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_parent, xsurface);
}
static void read_surface_client_id(struct wlr_xwm *xwm,
@@ -606,7 +605,7 @@ static void read_surface_client_id(struct wlr_xwm *xwm,
return;
}
xsurface->pid = *pid;
- wlr_signal_emit_safe(&xsurface->events.set_pid, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_pid, xsurface);
free(reply);
}
@@ -629,7 +628,7 @@ static void read_surface_window_type(struct wlr_xwm *xwm,
memcpy(xsurface->window_type, atoms, atoms_size);
xsurface->window_type_len = atoms_len;
- wlr_signal_emit_safe(&xsurface->events.set_window_type, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_window_type, xsurface);
}
static void read_surface_protocols(struct wlr_xwm *xwm,
@@ -674,7 +673,7 @@ static void read_surface_hints(struct wlr_xwm *xwm,
xsurface->hints->input = true;
}
- wlr_signal_emit_safe(&xsurface->events.set_hints, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_hints, xsurface);
}
static void read_surface_normal_hints(struct wlr_xwm *xwm,
@@ -744,7 +743,7 @@ static void read_surface_motif_hints(struct wlr_xwm *xwm,
WLR_XWAYLAND_SURFACE_DECORATIONS_NO_TITLE;
}
}
- wlr_signal_emit_safe(&xsurface->events.set_decorations, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_decorations, xsurface);
}
}
@@ -837,7 +836,7 @@ static void xwayland_surface_role_commit(struct wlr_surface *wlr_surface) {
if (!surface->mapped && wlr_surface_has_buffer(surface->surface)) {
surface->mapped = true;
- wlr_signal_emit_safe(&surface->events.map, surface);
+ wl_signal_emit_mutable(&surface->events.map, surface);
xwm_set_net_client_list(surface->xwm);
}
}
@@ -854,7 +853,7 @@ static void xwayland_surface_role_precommit(struct wlr_surface *wlr_surface,
// This is a NULL commit
if (surface->mapped) {
surface->mapped = false;
- wlr_signal_emit_safe(&surface->events.unmap, surface);
+ wl_signal_emit_mutable(&surface->events.unmap, surface);
xwm_set_net_client_list(surface->xwm);
}
}
@@ -909,7 +908,7 @@ static void xwm_map_shell_surface(struct wlr_xwm *xwm,
static void xsurface_unmap(struct wlr_xwayland_surface *surface) {
if (surface->mapped) {
- wlr_signal_emit_safe(&surface->events.unmap, surface);
+ wl_signal_emit_mutable(&surface->events.unmap, surface);
surface->mapped = false;
xwm_set_net_client_list(surface->xwm);
}
@@ -977,7 +976,7 @@ static void xwm_handle_configure_request(struct wlr_xwm *xwm,
.mask = mask,
};
- wlr_signal_emit_safe(&surface->events.request_configure, &wlr_event);
+ wl_signal_emit_mutable(&surface->events.request_configure, &wlr_event);
}
static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
@@ -1000,11 +999,11 @@ static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
if (xsurface->override_redirect != ev->override_redirect) {
xsurface->override_redirect = ev->override_redirect;
- wlr_signal_emit_safe(&xsurface->events.set_override_redirect, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_override_redirect, xsurface);
}
if (geometry_changed) {
- wlr_signal_emit_safe(&xsurface->events.set_geometry, NULL);
+ wl_signal_emit_mutable(&xsurface->events.set_geometry, NULL);
}
}
@@ -1086,7 +1085,7 @@ static void xwm_handle_map_notify(struct wlr_xwm *xwm,
if (xsurface->override_redirect != ev->override_redirect) {
xsurface->override_redirect = ev->override_redirect;
- wlr_signal_emit_safe(&xsurface->events.set_override_redirect, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_override_redirect, xsurface);
}
}
@@ -1198,7 +1197,7 @@ static void xwm_handle_net_wm_moveresize_message(struct wlr_xwm *xwm,
switch (detail) {
case _NET_WM_MOVERESIZE_MOVE:
move_event.surface = xsurface;
- wlr_signal_emit_safe(&xsurface->events.request_move, &move_event);
+ wl_signal_emit_mutable(&xsurface->events.request_move, &move_event);
break;
case _NET_WM_MOVERESIZE_SIZE_TOPLEFT:
case _NET_WM_MOVERESIZE_SIZE_TOP:
@@ -1210,7 +1209,7 @@ static void xwm_handle_net_wm_moveresize_message(struct wlr_xwm *xwm,
case _NET_WM_MOVERESIZE_SIZE_LEFT:
resize_event.surface = xsurface;
resize_event.edges = net_wm_edges_to_wlr(detail);
- wlr_signal_emit_safe(&xsurface->events.request_resize, &resize_event);
+ wl_signal_emit_mutable(&xsurface->events.request_resize, &resize_event);
break;
case _NET_WM_MOVERESIZE_CANCEL:
// handled by the compositor
@@ -1300,7 +1299,7 @@ static void xwm_handle_net_wm_state_message(struct wlr_xwm *xwm,
xsurface->saved_height = xsurface->height;
}
- wlr_signal_emit_safe(&xsurface->events.request_fullscreen, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.request_fullscreen, xsurface);
}
if (maximized != xsurface_is_maximized(xsurface)) {
@@ -1309,7 +1308,7 @@ static void xwm_handle_net_wm_state_message(struct wlr_xwm *xwm,
xsurface->saved_height = xsurface->height;
}
- wlr_signal_emit_safe(&xsurface->events.request_maximize, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.request_maximize, xsurface);
}
if (minimized != xsurface->minimized) {
@@ -1322,7 +1321,7 @@ static void xwm_handle_net_wm_state_message(struct wlr_xwm *xwm,
.surface = xsurface,
.minimize = xsurface->minimized,
};
- wlr_signal_emit_safe(&xsurface->events.request_minimize, &minimize_event);
+ wl_signal_emit_mutable(&xsurface->events.request_minimize, &minimize_event);
}
}
@@ -1358,7 +1357,7 @@ static void xwm_handle_net_active_window_message(struct wlr_xwm *xwm,
if (surface == NULL) {
return;
}
- wlr_signal_emit_safe(&surface->events.request_activate, surface);
+ wl_signal_emit_mutable(&surface->events.request_activate, surface);
}
static void pending_startup_id_destroy(struct pending_startup_id *pending) {
@@ -1423,7 +1422,7 @@ static void xwm_handle_net_startup_info_message(struct wlr_xwm *xwm,
if (id) {
struct wlr_xwayland_remove_startup_info_event data = { id, ev->window };
wlr_log(WLR_DEBUG, "Got startup id: %s", id);
- wlr_signal_emit_safe(&xwm->xwayland->events.remove_startup_info, &data);
+ wl_signal_emit_mutable(&xwm->xwayland->events.remove_startup_info, &data);
pending_startup_id_destroy(curr);
}
}
@@ -1451,7 +1450,7 @@ static void xwm_handle_wm_change_state_message(struct wlr_xwm *xwm,
.surface = xsurface,
.minimize = minimize,
};
- wlr_signal_emit_safe(&xsurface->events.request_minimize, &minimize_event);
+ wl_signal_emit_mutable(&xsurface->events.request_minimize, &minimize_event);
}
static void xwm_handle_client_message(struct wlr_xwm *xwm,