blob: 20d3ba9503e33a3935e2bd974e72cec817276d40 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.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;
}
|