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

@ -25,6 +25,7 @@
#include "sway/output.h"
#include "sway/input/seat.h"
#include "sway/server.h"
#include "sway/surface.h"
#include "sway/tree/arrange.h"
#include "sway/tree/container.h"
#include "sway/tree/view.h"
@ -1148,7 +1149,7 @@ void view_child_init(struct sway_view_child *child,
if (container != NULL) {
struct sway_workspace *workspace = container->pending.workspace;
if (workspace) {
wlr_surface_send_enter(child->surface, workspace->output->wlr_output);
surface_enter_output(child->surface, workspace->output);
}
}