diff options
author | B Stack <bgstack15@gmail.com> | 2021-01-15 15:00:54 -0500 |
---|---|---|
committer | Michael Homer <mwh@ecs.vuw.ac.nz> | 2021-01-16 09:29:31 +1300 |
commit | b2fd7861529d981a8cb2dba866bd77099580b9d2 (patch) | |
tree | 3c2f6b748e690272e543d2d0abb12474cf921fc3 | |
parent | Mention Wayland at top of readme (diff) | |
download | dragon-b2fd7861529d981a8cb2dba866bd77099580b9d2.tar.gz dragon-b2fd7861529d981a8cb2dba866bd77099580b9d2.tar.bz2 dragon-b2fd7861529d981a8cb2dba866bd77099580b9d2.zip |
fix #20
-rw-r--r-- | dragon.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -38,6 +38,7 @@ bool and_exit; bool keep; bool print_path = false; bool icons_only = false; +bool always_on_top = false; #define MODE_HELP 1 #define MODE_TARGET 2 @@ -361,6 +362,8 @@ int main (int argc, char **argv) { printf(" --print-path, -p with --target, print file paths" " instead of URIs\n"); printf(" --all, -a drag all files at once\n"); + printf(" --always, -A Always on top\n"); + printf(" --not-always, -N Not always on top\n"); printf(" --verbose, -v be verbose\n"); printf(" --help show help\n"); printf(" --version show version details\n"); @@ -393,6 +396,12 @@ int main (int argc, char **argv) { } else if (strcmp(argv[i], "-i") == 0 || strcmp(argv[i], "--icon-only") == 0) { icons_only = true; + } else if (strcmp(argv[i], "-A") == 0 + || strcmp(argv[i], "--always") == 0) { + always_on_top = true; + } else if (strcmp(argv[i], "-N") == 0 + || strcmp(argv[i], "--not-always") == 0) { + always_on_top = false; } else if (argv[i][0] == '-') { fprintf(stderr, "%s: error: unknown option `%s'.\n", progname, argv[i]); @@ -418,6 +427,7 @@ int main (int argc, char **argv) { gtk_window_set_title(GTK_WINDOW(window), "Run"); gtk_window_set_resizable(GTK_WINDOW(window), FALSE); + gtk_window_set_keep_above(GTK_WINDOW(window), always_on_top); g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL); |