aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2021-01-15 15:00:54 -0500
committerMichael Homer <mwh@ecs.vuw.ac.nz>2021-01-16 09:29:31 +1300
commitb2fd7861529d981a8cb2dba866bd77099580b9d2 (patch)
tree3c2f6b748e690272e543d2d0abb12474cf921fc3
parentMention Wayland at top of readme (diff)
downloaddragon-b2fd7861529d981a8cb2dba866bd77099580b9d2.tar.gz
dragon-b2fd7861529d981a8cb2dba866bd77099580b9d2.tar.bz2
dragon-b2fd7861529d981a8cb2dba866bd77099580b9d2.zip
fix #20
-rw-r--r--dragon.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/dragon.c b/dragon.c
index c388930..2d146c0 100644
--- a/dragon.c
+++ b/dragon.c
@@ -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);
bgstack15