wayland: Only send wl_output.scale event if supported by the client
'scale' was introduced in version 2, so only send such an event to clients which has bound a new enough version of wl_output. https://bugzilla.gnome.org/show_bug.cgi?id=729602
This commit is contained in:
parent
ea354e96cb
commit
b6f9500ccc
@ -142,9 +142,10 @@ bind_output (struct wl_client *client,
|
||||
(int)output->crtc->current_mode->refresh_rate);
|
||||
|
||||
output->scale = compute_scale (output);
|
||||
wl_resource_post_event (resource,
|
||||
WL_OUTPUT_SCALE,
|
||||
output->scale);
|
||||
if (version >= META_WL_OUTPUT_HAS_SCALE)
|
||||
wl_resource_post_event (resource,
|
||||
WL_OUTPUT_SCALE,
|
||||
output->scale);
|
||||
|
||||
if (version >= META_WL_OUTPUT_HAS_DONE)
|
||||
wl_resource_post_event (resource,
|
||||
|
@ -61,6 +61,7 @@
|
||||
|
||||
/* The first version to implement a specific event */
|
||||
#define META_WL_SEAT_HAS_NAME 2
|
||||
#define META_WL_OUTPUT_HAS_SCALE 2
|
||||
#define META_WL_OUTPUT_HAS_DONE 2
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user