diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-05-04 21:19:43 +0200 |
---|---|---|
committer | Kristian Høgsberg <krh@bitplanet.net> | 2011-05-04 16:18:31 -0400 |
commit | f64c66106f9d14ad2e3b8f19cede105248d91332 (patch) | |
tree | 60ae695e36d022dcf7b36f58184364a574e19ca7 | |
parent | 81e8c26176a0f17a10a66c8a8c18bbc2bb9e06fd (diff) |
compositor-openwfd: Fixup backend split
-rw-r--r-- | compositor/Makefile.am | 2 | ||||
-rw-r--r-- | compositor/compositor-openwfd.c | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/compositor/Makefile.am b/compositor/Makefile.am index 579b5f47..3e8d010b 100644 --- a/compositor/Makefile.am +++ b/compositor/Makefile.am @@ -61,7 +61,7 @@ openwfd_backend = openwfd-backend.la openwfd_backend_la_LDFLAGS = -module -avoid-version openwfd_backend_la_LIBADD = $(COMPOSITOR_LIBS) $(OPENWFD_COMPOSITOR_LIBS) openwfd_backend_la_CFLAGS = $(OPENWFD_COMPOSITOR_CFLAGS) -openwfd_backend_SOURCES = compositor-openwfd.c +openwfd_backend_la_SOURCES = compositor-openwfd.c tty.c evdev.c endif if ENABLE_DESKTOP_SHELL diff --git a/compositor/compositor-openwfd.c b/compositor/compositor-openwfd.c index a0957dd9..f561e357 100644 --- a/compositor/compositor-openwfd.c +++ b/compositor/compositor-openwfd.c @@ -578,3 +578,23 @@ wfd_compositor_create(struct wl_display *display, int connector) return &ec->base; } + +struct wlsc_compositor * +backend_init(struct wl_display *display, char *options) +{ + int connector = 0, i; + char *p, *value; + + static char * const tokens[] = { "connector", NULL }; + + p = options; + while (i = getsubopt(&p, tokens, &value), i != -1) { + switch (i) { + case 0: + connector = strtol(value, NULL, 0); + break; + } + } + + return wfd_compositor_create(display, connector); +} |