mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-28 08:56:32 -05:00
Use wl_signal_emit_mutable
This commit is contained in:
parent
013f121f45
commit
ef4baea0e2
91 changed files with 365 additions and 456 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue