mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
xdg-surface: avoid emitting signals with their owner object
https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/1008#note_1139647
This commit is contained in:
parent
6ed3b02775
commit
7ed60c54a0
2 changed files with 4 additions and 4 deletions
|
@ -84,7 +84,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, surface);
|
||||
wlr_signal_emit_safe(&surface->events.ping_timeout, NULL);
|
||||
}
|
||||
|
||||
client->ping_serial = 0;
|
||||
|
|
|
@ -37,7 +37,7 @@ void unmap_xdg_surface(struct wlr_xdg_surface *surface) {
|
|||
|
||||
// TODO: probably need to ungrab before this event
|
||||
if (surface->mapped) {
|
||||
wlr_signal_emit_safe(&surface->events.unmap, surface);
|
||||
wlr_signal_emit_safe(&surface->events.unmap, NULL);
|
||||
}
|
||||
|
||||
switch (surface->role) {
|
||||
|
@ -312,7 +312,7 @@ void xdg_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);
|
||||
wlr_signal_emit_safe(&surface->events.map, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ void reset_xdg_surface(struct wlr_xdg_surface *surface) {
|
|||
}
|
||||
|
||||
if (surface->added) {
|
||||
wlr_signal_emit_safe(&surface->events.destroy, surface);
|
||||
wlr_signal_emit_safe(&surface->events.destroy, NULL);
|
||||
surface->added = false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue