Code Review
/
src
/
window-management-client-grpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
AglShellGrpcClient: Add support for split windows
[src/window-management-client-grpc.git]
/
src
/
main.cpp
diff --git
a/src/main.cpp
b/src/main.cpp
index
6ab9530
..
3db6372
100644
(file)
--- a/
src/main.cpp
+++ b/
src/main.cpp
@@
-48,6
+48,7
@@
enum mode {
ON_OTHER_OUTPUTS = 4,
SET_FLOAT_POS = 5,
SCALE = 6,
ON_OTHER_OUTPUTS = 4,
SET_FLOAT_POS = 5,
SCALE = 6,
+ SPLIT = 7,
};
static QWindow *
};
static QWindow *
@@
-87,12
+88,14
@@
int main(int argc, char *argv[])
mmode = SET_FLOAT_POS;
else if (strcmp(argv[1], "scale") == 0)
mmode = SCALE;
mmode = SET_FLOAT_POS;
else if (strcmp(argv[1], "scale") == 0)
mmode = SCALE;
+ else if (strcmp(argv[1], "split") == 0)
+ mmode = SPLIT;
else
assert(!"Invalid mode");
if (mmode != FLOAT && mmode != FULLSCREEN &&
mmode != ON_OTHER_OUTPUTS && mmode != SET_FLOAT_POS &&
else
assert(!"Invalid mode");
if (mmode != FLOAT && mmode != FULLSCREEN &&
mmode != ON_OTHER_OUTPUTS && mmode != SET_FLOAT_POS &&
- mmode != SCALE) {
+ mmode != SCALE
&& mmode != SPLIT
) {
fprintf(stderr, "Will not use rpc\n");
goto skip;
}
fprintf(stderr, "Will not use rpc\n");
goto skip;
}
@@
-100,6
+103,9
@@
int main(int argc, char *argv[])
if (mmode == ON_OTHER_OUTPUTS)
output_name = argv[2];
if (mmode == ON_OTHER_OUTPUTS)
output_name = argv[2];
+ if (mmode == SPLIT)
+ output_name = argv[2];
+
// start grpc connection
GrpcClient *client = new GrpcClient();
// start grpc connection
GrpcClient *client = new GrpcClient();
@@
-140,6
+146,11
@@
int main(int argc, char *argv[])
client->SetAppScale(myname.toStdString(), 200, 200);
exit(EXIT_SUCCESS);
break;
client->SetAppScale(myname.toStdString(), 200, 200);
exit(EXIT_SUCCESS);
break;
+ case SPLIT:
+ // put it on the bottom
+ client->SetAppSplit(myname.toStdString(), 4, 0, 0,
+ std::string(output_name));
+ break;
default:
break;
}
default:
break;
}