diff options
-rw-r--r-- | packaging/weston-generic.spec | 1 | ||||
-rw-r--r-- | tz-launcher/Makefile.am | 8 | ||||
-rw-r--r-- | tz-launcher/wl-pre.c | 25 |
3 files changed, 33 insertions, 1 deletions
diff --git a/packaging/weston-generic.spec b/packaging/weston-generic.spec index 42ae626..f17f393 100644 --- a/packaging/weston-generic.spec +++ b/packaging/weston-generic.spec @@ -151,3 +151,4 @@ ln -sf ../weston-user.service %{_unitdir_user}/default.target.wants/ %defattr(-,root,root) %license tz-launcher/COPYING %{_bindir}/tz-launcher +%{_bindir}/wl-pre diff --git a/tz-launcher/Makefile.am b/tz-launcher/Makefile.am index d7e8eb8..c1ecd64 100644 --- a/tz-launcher/Makefile.am +++ b/tz-launcher/Makefile.am @@ -10,7 +10,7 @@ AM_CPPFLAGS = \ CLEANFILES = -bin_PROGRAMS += tz-launcher +bin_PROGRAMS += tz-launcher wl-pre tz_launcher_LDFLAGS = -export-dynamic tz_launcher_CPPFLAGS = $(AM_CPPFLAGS) @@ -28,3 +28,9 @@ tz_launcher_SOURCES = \ toytoolkit/text-cursor-position-protocol.c \ toytoolkit/workspaces-protocol.c \ toytoolkit/window.c + +wl_pre_LDFLAGS = -export-dynamic +wl_pre_CFLAGS = $(GCC_CFLAGS) $(CLIENT_CFLAGS) +wl_pre_LDADD = $(DLOPEN_LIBS) $(CLIENT_LIBS) + +wl_pre_SOURCES = wl-pre.c diff --git a/tz-launcher/wl-pre.c b/tz-launcher/wl-pre.c new file mode 100644 index 0000000..275af41 --- /dev/null +++ b/tz-launcher/wl-pre.c @@ -0,0 +1,25 @@ +#include <stdio.h>
+#include <wayland-client.h>
+
+
+int main (int argc, char *argv[])
+{
+ if (argc != 2) {
+ printf ("Usage : wl-pre \"<command line>\"\n");
+ return 0;
+ }
+
+ struct wl_display *display = NULL;
+
+ while (!display) {
+ display = wl_display_connect (NULL);
+ sleep (1);
+ }
+
+ char *command;
+ asprintf (&command, "%s &", argv[1]);
+ system (command);
+ free (command);
+
+ return 0;
+}
|