mirror of
https://github.com/gwenhael-le-moine/sway-patched-tray-menu.git
synced 2024-12-27 21:58:16 +01:00
Merge branch 'master' into tray
This commit is contained in:
commit
0fc9628f03
2 changed files with 3 additions and 1 deletions
|
@ -41,6 +41,7 @@ static void spawn_status_cmd_proc(struct bar *bar) {
|
||||||
close(pipefd[0]);
|
close(pipefd[0]);
|
||||||
dup2(pipefd[1], STDOUT_FILENO);
|
dup2(pipefd[1], STDOUT_FILENO);
|
||||||
close(pipefd[1]);
|
close(pipefd[1]);
|
||||||
|
setpgid(bar->status_command_pid, 0);
|
||||||
char *const cmd[] = {
|
char *const cmd[] = {
|
||||||
"sh",
|
"sh",
|
||||||
"-c",
|
"-c",
|
||||||
|
@ -290,7 +291,7 @@ static void free_outputs(list_t *outputs) {
|
||||||
static void terminate_status_command(pid_t pid) {
|
static void terminate_status_command(pid_t pid) {
|
||||||
if (pid) {
|
if (pid) {
|
||||||
// terminate status_command process
|
// terminate status_command process
|
||||||
int ret = kill(pid, SIGTERM);
|
int ret = killpg(pid, SIGTERM);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
sway_log(L_ERROR, "Unable to terminate status_command [pid: %d]", pid);
|
sway_log(L_ERROR, "Unable to terminate status_command [pid: %d]", pid);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
|
||||||
PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, const char *text,
|
PangoLayout *get_pango_layout(cairo_t *cairo, const char *font, const char *text,
|
||||||
|
|
Loading…
Reference in a new issue