Skip to content

Commit

Permalink
strip / from app name
Browse files Browse the repository at this point in the history
1. use brave browser profile information from window class
2. better security
  • Loading branch information
sagb committed May 10, 2024
1 parent 696a0fb commit 8ebe69e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/win.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ int addIconFromHints(WindowInfo * wi)
//
int addIconFromFiles(WindowInfo * wi)
{
char *appclass, *tryclass;
char *appclass, *tryclass, *s;
long unsigned int class_size;
icon_t *ic;
int ret = 0;
Expand All @@ -340,6 +340,8 @@ int addIconFromFiles(WindowInfo * wi)
if (appclass) {
for (tryclass = appclass; tryclass - appclass < class_size;
tryclass += (strlen(tryclass) + 1)) {
s = tryclass;
while ((s = strchr(s, '/')) != NULL) *s++ = '_';
ic = lookupIcon(tryclass);
if (ic &&
(g.option_iconSrc != ISRC_SIZE
Expand Down

0 comments on commit 8ebe69e

Please sign in to comment.