compositor: Add a switch_mode hook and a wrapper into the output.
This allow each output backend to switch the display mode. It is
useful to some applications like fullscreen game, xbmc.
diff --git a/src/compositor.c b/src/compositor.c
index 17daac4..9b7badf 100644
--- a/src/compositor.c
+++ b/src/compositor.c
@@ -79,6 +79,15 @@
return 1;
}
+WL_EXPORT int
+weston_output_switch_mode(struct weston_output *output, struct weston_mode *mode)
+{
+ if (!output->switch_mode)
+ return -1;
+
+ return output->switch_mode(output, mode);
+}
+
WL_EXPORT void
weston_watch_process(struct weston_process *process)
{