Skip to content

Commit

Permalink
output-layout: add support for custom modes in wlr-output-management-v1
Browse files Browse the repository at this point in the history
WayfireWM#1984
WayfireWM#1977
support custom output resolution
  • Loading branch information
xiaohuirong committed Oct 22, 2024
1 parent 41a2ae9 commit 343fc84
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/core/output-layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,20 +579,7 @@ struct output_layout_output_t
/** Check whether the given state can be applied */
bool test_state(const output_state_t& state)
{
if (state.source == OUTPUT_IMAGE_SOURCE_NONE)
{
return true;
}

if (state.source == OUTPUT_IMAGE_SOURCE_MIRROR)
{
return true;
}

/* XXX: are there more things to check? */
refresh_custom_modes();

return is_mode_supported(state.mode);
return true;
}

/** Change the output mode */
Expand Down Expand Up @@ -624,8 +611,7 @@ struct output_layout_output_t
" for output ", handle->name, ". Trying to use custom mode",
"(might not work)");

wlr_output_set_custom_mode(handle, mode.width, mode.height,
mode.refresh);
wlr_output_set_custom_mode(handle, mode.width, mode.height, mode.refresh);
}

wlr_output_commit(handle);
Expand Down

0 comments on commit 343fc84

Please sign in to comment.