Introduce surface_{enter,leave}_output()

We can centralize all output-related surface events from there.
This commit is contained in:
Simon Ser 2023-02-08 15:25:14 +01:00 committed by Kenny Levinsen
parent 8e4b659578
commit 1cab17ada2
6 changed files with 30 additions and 11 deletions

View file

@ -5,6 +5,7 @@
#include "sway/input/seat.h"
#include "sway/output.h"
#include "sway/server.h"
#include "sway/surface.h"
struct sway_session_lock_surface {
struct wlr_session_lock_surface_v1 *lock_surface;
@ -31,7 +32,7 @@ static void handle_surface_map(struct wl_listener *listener, void *data) {
if (server.session_lock.focused == NULL) {
set_lock_focused_surface(surf->surface);
}
wlr_surface_send_enter(surf->surface, surf->output->wlr_output);
surface_enter_output(surf->surface, surf->output);
output_damage_whole(surf->output);
}