mirror of
https://github.com/cage-kiosk/cage.git
synced 2026-03-11 05:34:37 -04:00
Cage: implement output transform
This commit adds the command line switch -r, which rotates the output 90 degrees clockwise and can be specified up to three times.
This commit is contained in:
parent
69872baead
commit
9e6a5ad44f
4 changed files with 20 additions and 6 deletions
11
cage.c
11
cage.c
|
|
@ -87,6 +87,7 @@ usage(FILE *file, const char *cage)
|
|||
fprintf(file, "Usage: %s [OPTIONS] [--] APPLICATION\n"
|
||||
"\n"
|
||||
" -d\t Don't draw client side decorations, when possible\n"
|
||||
" -r\t Rotate the output 90 degrees clockwise, specify up to three times\n"
|
||||
#ifdef DEBUG
|
||||
" -D\t Turn on damage tracking debugging\n"
|
||||
#endif
|
||||
|
|
@ -101,14 +102,20 @@ parse_args(struct cg_server *server, int argc, char *argv[])
|
|||
{
|
||||
int c;
|
||||
#ifdef DEBUG
|
||||
while ((c = getopt(argc, argv, "dDh")) != -1) {
|
||||
while ((c = getopt(argc, argv, "drDh")) != -1) {
|
||||
#else
|
||||
while ((c = getopt(argc, argv, "dh")) != -1) {
|
||||
while ((c = getopt(argc, argv, "drh")) != -1) {
|
||||
#endif
|
||||
switch (c) {
|
||||
case 'd':
|
||||
server->xdg_decoration = true;
|
||||
break;
|
||||
case 'r':
|
||||
server->output_transform++;
|
||||
if (server->output_transform > WL_OUTPUT_TRANSFORM_270) {
|
||||
server->output_transform = WL_OUTPUT_TRANSFORM_NORMAL;
|
||||
}
|
||||
break;
|
||||
#ifdef DEBUG
|
||||
case 'D':
|
||||
server->debug_damage_tracking = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue