projects
/
platform
/
upstream
/
weston.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36bcf47
)
weston-dnd --help works
author
Bill Spitzak
<spitzak@gmail.com>
Fri, 8 Aug 2014 19:59:57 +0000
(12:59 -0700)
committer
Pekka Paalanen
<pekka.paalanen@collabora.co.uk>
Tue, 19 Aug 2014 09:21:37 +0000
(12:21 +0300)
clients/dnd.c
patch
|
blob
|
history
diff --git
a/clients/dnd.c
b/clients/dnd.c
index
620cfff
..
956c306
100644
(file)
--- a/
clients/dnd.c
+++ b/
clients/dnd.c
@@
-652,7
+652,14
@@
main(int argc, char *argv[])
{
struct display *d;
struct dnd *dnd;
- int i;
+ int self_only = 0;
+
+ if (argc == 2 && !strcmp(argv[1], "--self-only"))
+ self_only = 1;
+ else if (argc > 1) {
+ printf("Usage: %s [OPTIONS]\n --self-only\n", argv[0]);
+ return 1;
+ }
d = display_create(&argc, argv);
if (d == NULL) {
@@
-661,10
+668,8
@@
main(int argc, char *argv[])
}
dnd = dnd_create(d);
-
- for (i = 1; i < argc; i++)
- if (strcmp("--self-only", argv[i]) == 0)
- dnd->self_only = 1;
+ if (self_only)
+ dnd->self_only = 1;
display_run(d);