wayland: Use the send event wrappers

Rather than raw post_event.
This commit is contained in:
Jasper St. Pierre 2014-08-05 16:11:48 -04:00
parent 2ce23072d3
commit e5c4fedd55

View File

@ -114,8 +114,7 @@ bind_output (struct wl_client *client,
output->crtc->rect.width, output->crtc->rect.height,
output->crtc->current_mode->refresh_rate);
wl_resource_post_event (resource,
WL_OUTPUT_GEOMETRY,
wl_output_send_geometry (resource,
(int)output->crtc->rect.x,
(int)output->crtc->rect.y,
output->width_mm,
@ -133,8 +132,7 @@ bind_output (struct wl_client *client,
if (output->crtc->current_mode == output->preferred_mode)
mode_flags |= WL_OUTPUT_MODE_PREFERRED;
wl_resource_post_event (resource,
WL_OUTPUT_MODE,
wl_output_send_mode (resource,
mode_flags,
(int)output->crtc->current_mode->width,
(int)output->crtc->current_mode->height,
@ -142,13 +140,10 @@ bind_output (struct wl_client *client,
output->scale = compute_scale (output);
if (version >= WL_OUTPUT_SCALE_SINCE_VERSION)
wl_resource_post_event (resource,
WL_OUTPUT_SCALE,
output->scale);
wl_output_send_scale (resource, output->scale);
if (version >= WL_OUTPUT_DONE_SINCE_VERSION)
wl_resource_post_event (resource,
WL_OUTPUT_DONE);
wl_output_send_done (resource);
}
static void