xwayland: add xwl_output_from_wl_output()
Add a convenient function to get the xwl_output from a given wl_output. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
b0cee5e703
commit
f80bf83465
|
@ -752,6 +752,20 @@ xwl_output_set_emulated(struct xwl_output *xwl_output)
|
|||
&val, FALSE, FALSE);
|
||||
}
|
||||
|
||||
struct xwl_output*
|
||||
xwl_output_from_wl_output(struct xwl_screen *xwl_screen,
|
||||
struct wl_output* wl_output)
|
||||
{
|
||||
struct xwl_output *xwl_output;
|
||||
|
||||
xorg_list_for_each_entry(xwl_output, &xwl_screen->output_list, link) {
|
||||
if (xwl_output->output == wl_output)
|
||||
return xwl_output;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct xwl_output *
|
||||
xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id, Bool with_xrandr)
|
||||
{
|
||||
|
|
|
@ -79,6 +79,9 @@ Bool xwl_screen_init_randr_fixed(struct xwl_screen *xwl_screen);
|
|||
void xwl_output_set_mode_fixed(struct xwl_output *xwl_output,
|
||||
RRModePtr mode);
|
||||
|
||||
struct xwl_output *xwl_output_from_wl_output(struct xwl_screen *xwl_screen,
|
||||
struct wl_output* wl_output);
|
||||
|
||||
struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen,
|
||||
uint32_t id, Bool with_xrandr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue