Handle output enter/leave correctly

This commit is contained in:
Drew DeVault 2017-10-25 22:37:02 -04:00
parent 9861add146
commit a6930cd8ea
6 changed files with 51 additions and 32 deletions

View file

@ -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) {

View file

@ -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;
}
}
}