summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2019-11-07 16:44:30 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2019-11-07 16:44:30 +0100
commitf1d41ee79a9e5abaeadaf1b9ef88a2561eb8d832 (patch)
tree154d2c484b18221dda4a22b9581911cbd747cc2f /src
parente0e3deaca9201498d590879222b582e2c30ef3d5 (diff)
parent8401448521221f38dfa0674c236ae99dde575538 (diff)
Merge branch 'Ferada-x11-properties'
Diffstat (limited to 'src')
-rw-r--r--src/options.c4
-rw-r--r--src/options.h1
-rw-r--r--src/winwidget.c2
3 files changed, 6 insertions, 1 deletions
diff --git a/src/options.c b/src/options.c
index 4c34b66..d3c1d52 100644
--- a/src/options.c
+++ b/src/options.c
@@ -430,6 +430,7 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
#ifdef HAVE_INOTIFY
{"auto-reload" , 0, 0, 248},
#endif
+ {"class" , 1, 0, 249},
{0, 0, 0, 0}
};
int optch = 0, cmdx = 0;
@@ -823,6 +824,9 @@ static void feh_parse_option_array(int argc, char **argv, int finalrun)
opt.auto_reload = 1;
break;
#endif
+ case 249:
+ opt.x11_class = estrdup(optarg);
+ break;
default:
break;
}
diff --git a/src/options.h b/src/options.h
index 883c8e2..93474a9 100644
--- a/src/options.h
+++ b/src/options.h
@@ -128,6 +128,7 @@ struct __fehoptions {
int zoom_mode;
unsigned char adjust_reload;
int xinerama_index;
+ char *x11_class;
/* signed in case someone wants to invert scrolling real quick */
int scroll_step;
diff --git a/src/winwidget.c b/src/winwidget.c
index 70a65e0..cef7230 100644
--- a/src/winwidget.c
+++ b/src/winwidget.c
@@ -305,7 +305,7 @@ void winwidget_create_window(winwidget ret, int w, int h)
winwidget_update_title(ret);
xch = XAllocClassHint();
xch->res_name = "feh";
- xch->res_class = "feh";
+ xch->res_class = opt.x11_class ? opt.x11_class : "feh";
XSetClassHint(disp, ret->win, xch);
XFree(xch);