mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-10 04:27:51 -05:00
backend/drm: add support for suggested output position prop
Virtualised outputs use the "suggested X" and "suggested Y" DRM props to indicate their relative position on the host WM. This change adds members `suggested_x` and `suggested_y` to `struct wlr_output` which contain the value of these props. Also, a `suggested_position` signal is added so that compositors can be notified if there is a changed in the suggested position.
This commit is contained in:
parent
a055f23b3b
commit
82f92113fd
6 changed files with 66 additions and 0 deletions
|
|
@ -17,6 +17,8 @@ union wlr_drm_connector_props {
|
|||
uint32_t link_status; // not guaranteed to exist
|
||||
uint32_t path;
|
||||
uint32_t vrr_capable; // not guaranteed to exist
|
||||
uint32_t suggested_x;
|
||||
uint32_t suggested_y;
|
||||
|
||||
// atomic-modesetting only
|
||||
|
||||
|
|
|
|||
|
|
@ -116,6 +116,13 @@ void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
|
|||
* to notify compositors about the change.
|
||||
*/
|
||||
void wlr_output_update_available_modes(struct wlr_output *output);
|
||||
/**
|
||||
* Update the output suggested position.
|
||||
*
|
||||
* The backend must call this function when the suggested position is updated
|
||||
* to notify compositors about the change.
|
||||
*/
|
||||
void wlr_output_update_suggested_position (struct wlr_output *output);
|
||||
/**
|
||||
* Update the current output status.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -128,6 +128,7 @@ struct wlr_output {
|
|||
char model[16];
|
||||
char serial[16];
|
||||
int32_t phys_width, phys_height; // mm
|
||||
int32_t suggested_x, suggested_y;
|
||||
|
||||
// Note: some backends may have zero modes
|
||||
struct wl_list modes; // wlr_output_mode::link
|
||||
|
|
@ -171,6 +172,7 @@ struct wlr_output {
|
|||
struct wl_signal enable;
|
||||
struct wl_signal mode;
|
||||
struct wl_signal available_modes;
|
||||
struct wl_signal suggested_position;
|
||||
struct wl_signal scale;
|
||||
struct wl_signal transform;
|
||||
struct wl_signal description;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue