aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2023-07-09 11:51:31 +0200
committerSimon Ser <contact@emersion.fr>2023-07-09 12:18:49 +0200
commit27edd024f83892f4af9c5084d47b73f26966aaf1 (patch)
treee44a3abe1c7c8671f6161b7a97d68d7fa457046e
parent76e2a74282b86c40180a41bdf408dac701169a74 (diff)
xwayland: pass NULL as event data
This is more extensible: in the future we can introduce event structs if we need to.
-rw-r--r--xwayland/xwm.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/xwayland/xwm.c b/xwayland/xwm.c
index 81ea1e56..2f690f41 100644
--- a/xwayland/xwm.c
+++ b/xwayland/xwm.c
@@ -127,7 +127,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;
- wl_signal_emit_mutable(&surface->events.ping_timeout, surface);
+ wl_signal_emit_mutable(&surface->events.ping_timeout, NULL);
surface->pinging = false;
return 1;
}
@@ -417,7 +417,7 @@ static void xwayland_surface_dissociate(struct wlr_xwayland_surface *xsurface) {
static void xwayland_surface_destroy(struct wlr_xwayland_surface *xsurface) {
xwayland_surface_dissociate(xsurface);
- wl_signal_emit_mutable(&xsurface->events.destroy, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.destroy, NULL);
if (xsurface == xsurface->xwm->focus_surface) {
xwm_surface_activate(xsurface->xwm, NULL);
@@ -477,7 +477,7 @@ static void read_surface_class(struct wlr_xwm *xwm,
surface->class = NULL;
}
- wl_signal_emit_mutable(&surface->events.set_class, surface);
+ wl_signal_emit_mutable(&surface->events.set_class, NULL);
}
static void read_surface_startup_id(struct wlr_xwm *xwm,
@@ -500,7 +500,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)");
- wl_signal_emit_mutable(&xsurface->events.set_startup_id, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_startup_id, NULL);
}
static void read_surface_role(struct wlr_xwm *xwm,
@@ -521,7 +521,7 @@ static void read_surface_role(struct wlr_xwm *xwm,
xsurface->role = NULL;
}
- wl_signal_emit_mutable(&xsurface->events.set_role, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_role, NULL);
}
static void read_surface_title(struct wlr_xwm *xwm,
@@ -548,7 +548,7 @@ static void read_surface_title(struct wlr_xwm *xwm,
}
xsurface->has_utf8_title = is_utf8;
- wl_signal_emit_mutable(&xsurface->events.set_title, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_title, NULL);
}
static bool has_parent(struct wlr_xwayland_surface *parent,
@@ -593,7 +593,7 @@ static void read_surface_parent(struct wlr_xwm *xwm,
wl_list_init(&xsurface->parent_link);
}
- wl_signal_emit_mutable(&xsurface->events.set_parent, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_parent, NULL);
}
static void read_surface_client_id(struct wlr_xwm *xwm,
@@ -627,7 +627,7 @@ static void read_surface_client_id(struct wlr_xwm *xwm,
return;
}
xsurface->pid = *pid;
- wl_signal_emit_mutable(&xsurface->events.set_pid, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_pid, NULL);
free(reply);
}
@@ -650,7 +650,7 @@ static void read_surface_window_type(struct wlr_xwm *xwm,
memcpy(xsurface->window_type, atoms, atoms_size);
xsurface->window_type_len = atoms_len;
- wl_signal_emit_mutable(&xsurface->events.set_window_type, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_window_type, NULL);
}
static void read_surface_protocols(struct wlr_xwm *xwm,
@@ -695,7 +695,7 @@ static void read_surface_hints(struct wlr_xwm *xwm,
xsurface->hints->input = true;
}
- wl_signal_emit_mutable(&xsurface->events.set_hints, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_hints, NULL);
}
static void read_surface_normal_hints(struct wlr_xwm *xwm,
@@ -765,7 +765,7 @@ static void read_surface_motif_hints(struct wlr_xwm *xwm,
WLR_XWAYLAND_SURFACE_DECORATIONS_NO_TITLE;
}
}
- wl_signal_emit_mutable(&xsurface->events.set_decorations, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_decorations, NULL);
}
}
@@ -798,7 +798,7 @@ static void read_surface_strut_partial(struct wlr_xwm *xwm,
xsurface->strut_partial->bottom =
xwm->screen->height_in_pixels - xsurface->strut_partial->bottom;
- wl_signal_emit_mutable(&xsurface->events.set_strut_partial, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_strut_partial, NULL);
}
static void read_surface_net_wm_state(struct wlr_xwm *xwm,
@@ -1026,7 +1026,7 @@ static void xwm_handle_configure_notify(struct wlr_xwm *xwm,
if (xsurface->override_redirect != ev->override_redirect) {
xsurface->override_redirect = ev->override_redirect;
- wl_signal_emit_mutable(&xsurface->events.set_override_redirect, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_override_redirect, NULL);
}
if (geometry_changed) {
@@ -1117,7 +1117,7 @@ static void xwm_handle_map_notify(struct wlr_xwm *xwm,
if (xsurface->override_redirect != ev->override_redirect) {
xsurface->override_redirect = ev->override_redirect;
- wl_signal_emit_mutable(&xsurface->events.set_override_redirect, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.set_override_redirect, NULL);
}
}
@@ -1347,7 +1347,7 @@ static void xwm_handle_net_wm_state_message(struct wlr_xwm *xwm,
xsurface->saved_height = xsurface->height;
}
- wl_signal_emit_mutable(&xsurface->events.request_fullscreen, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.request_fullscreen, NULL);
}
if (maximized != xsurface_is_maximized(xsurface)) {
@@ -1356,7 +1356,7 @@ static void xwm_handle_net_wm_state_message(struct wlr_xwm *xwm,
xsurface->saved_height = xsurface->height;
}
- wl_signal_emit_mutable(&xsurface->events.request_maximize, xsurface);
+ wl_signal_emit_mutable(&xsurface->events.request_maximize, NULL);
}
if (minimized != xsurface->minimized) {
@@ -1405,7 +1405,7 @@ static void xwm_handle_net_active_window_message(struct wlr_xwm *xwm,
if (surface == NULL) {
return;
}
- wl_signal_emit_mutable(&surface->events.request_activate, surface);
+ wl_signal_emit_mutable(&surface->events.request_activate, NULL);
}
static void pending_startup_id_destroy(struct pending_startup_id *pending) {