mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-04 13:29:56 -05:00
opt: optimize code struct
This commit is contained in:
parent
5e726726ce
commit
b697e94fb4
2 changed files with 7 additions and 7 deletions
|
|
@ -19,6 +19,13 @@ pid_t getparentprocess(pid_t p) {
|
||||||
return (pid_t)v;
|
return (pid_t)v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int isdescprocess(pid_t p, pid_t c) {
|
||||||
|
while (p != c && c != 0)
|
||||||
|
c = getparentprocess(c);
|
||||||
|
|
||||||
|
return (int)c;
|
||||||
|
}
|
||||||
|
|
||||||
char *get_autostart_path(char *autostart_path, unsigned int buf_size) {
|
char *get_autostart_path(char *autostart_path, unsigned int buf_size) {
|
||||||
const char *maomaoconfig = getenv("MAOMAOCONFIG");
|
const char *maomaoconfig = getenv("MAOMAOCONFIG");
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -907,13 +907,6 @@ void client_update_oldmonname_record(Client *c, Monitor *m) {
|
||||||
c->oldmonname[sizeof(c->oldmonname) - 1] = '\0';
|
c->oldmonname[sizeof(c->oldmonname) - 1] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
int isdescprocess(pid_t p, pid_t c) {
|
|
||||||
while (p != c && c != 0)
|
|
||||||
c = getparentprocess(c);
|
|
||||||
|
|
||||||
return (int)c;
|
|
||||||
}
|
|
||||||
|
|
||||||
void swallow(Client *c, Client *w) {
|
void swallow(Client *c, Client *w) {
|
||||||
c->bw = w->bw;
|
c->bw = w->bw;
|
||||||
c->isfloating = w->isfloating;
|
c->isfloating = w->isfloating;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue