mirror of
https://github.com/mintycube/slock.git
synced 2024-10-22 14:05:51 +02:00
Fix for secret password patch compilation error ref. #6
This commit is contained in:
parent
dc5c20a6d1
commit
51d3f49e04
18
slock.c
18
slock.c
@ -93,6 +93,14 @@ typedef struct {
|
|||||||
} ResourcePref;
|
} ResourcePref;
|
||||||
#endif // XRESOURCES_PATCH
|
#endif // XRESOURCES_PATCH
|
||||||
|
|
||||||
|
#if SECRET_PASSWORD_PATCH
|
||||||
|
typedef struct secretpass secretpass;
|
||||||
|
struct secretpass {
|
||||||
|
char *pass;
|
||||||
|
char *command;
|
||||||
|
};
|
||||||
|
#endif // SECRET_PASSWORD_PATCH
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
struct lock {
|
struct lock {
|
||||||
@ -112,14 +120,6 @@ struct lock {
|
|||||||
#endif // DWM_LOGO_PATCH
|
#endif // DWM_LOGO_PATCH
|
||||||
};
|
};
|
||||||
|
|
||||||
#if SECRET_PASSWORD_PATCH
|
|
||||||
typedef struct secretpass secretpass;
|
|
||||||
struct secretpass {
|
|
||||||
char *pass;
|
|
||||||
char *command;
|
|
||||||
};
|
|
||||||
#endif // SECRET_PASSWORD_PATCH
|
|
||||||
|
|
||||||
struct xrandr {
|
struct xrandr {
|
||||||
int active;
|
int active;
|
||||||
int evbase;
|
int evbase;
|
||||||
@ -306,7 +306,7 @@ readpw(Display *dpy, struct xrandr *rr, struct lock **locks, int nscreens,
|
|||||||
#if SECRET_PASSWORD_PATCH
|
#if SECRET_PASSWORD_PATCH
|
||||||
for (int i = 0; i < LENGTH(scom); i++) {
|
for (int i = 0; i < LENGTH(scom); i++) {
|
||||||
if (strcmp(scom[i].pass, passwd) == 0) {
|
if (strcmp(scom[i].pass, passwd) == 0) {
|
||||||
system(scom[i].command);
|
if (system(scom[i].command));
|
||||||
#if FAILURE_COMMAND_PATCH
|
#if FAILURE_COMMAND_PATCH
|
||||||
failtrack = -1;
|
failtrack = -1;
|
||||||
#endif // FAILURE_COMMAND_PATCH
|
#endif // FAILURE_COMMAND_PATCH
|
||||||
|
Loading…
Reference in New Issue
Block a user