Skip to content

Commit

Permalink
Don't send output events that are not supported in the agreed protoco…
Browse files Browse the repository at this point in the history
…l version. (Fixes #389)
  • Loading branch information
AlanGriffiths committed Jul 9, 2018
1 parent b484f26 commit 7453082
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/server/frontend_wayland/output_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ void mf::Output::send_initial_config(wl_resource* client_resource, mg::DisplayCo
mode.size.height.as_int(),
mode.vrefresh_hz * 1000);
}
wl_output_send_scale(client_resource, 1);
wl_output_send_done(client_resource);

if (wl_resource_get_version(client_resource) >= WL_OUTPUT_SCALE_SINCE_VERSION)
wl_output_send_scale(client_resource, 1);

if (wl_resource_get_version(client_resource) >= WL_OUTPUT_DONE_SINCE_VERSION)
wl_output_send_done(client_resource);
}

wl_global* mf::Output::make_output(wl_display* display)
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance-tests/wayland/wlcs
Submodule wlcs updated from df0901 to 4fe637

0 comments on commit 7453082

Please sign in to comment.