mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-12 13:29:45 -05:00
Handle output enter/leave correctly
This commit is contained in:
parent
9861add146
commit
a6930cd8ea
6 changed files with 51 additions and 32 deletions
|
|
@ -43,7 +43,6 @@ static void wl_output_send_to_resource(struct wl_resource *resource) {
|
|||
}
|
||||
}
|
||||
if (version >= WL_OUTPUT_SCALE_SINCE_VERSION) {
|
||||
wlr_log(L_DEBUG, "Sending scale");
|
||||
wl_output_send_scale(resource, output->scale);
|
||||
}
|
||||
if (version >= WL_OUTPUT_DONE_SINCE_VERSION) {
|
||||
|
|
|
|||
|
|
@ -901,9 +901,20 @@ void wlr_surface_send_enter(struct wlr_surface *surface,
|
|||
struct wl_resource *resource;
|
||||
wl_resource_for_each(resource, &output->wl_resources) {
|
||||
if (client == wl_resource_get_client(resource)) {
|
||||
wlr_log(L_DEBUG, "sending output enter");
|
||||
wl_surface_send_enter(surface->resource, resource);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void wlr_surface_send_leave(struct wlr_surface *surface,
|
||||
struct wlr_output *output) {
|
||||
struct wl_client *client = wl_resource_get_client(surface->resource);
|
||||
struct wl_resource *resource;
|
||||
wl_resource_for_each(resource, &output->wl_resources) {
|
||||
if (client == wl_resource_get_client(resource)) {
|
||||
wl_surface_send_leave(surface->resource, resource);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue