Merge pull request #2165 from swaywm/pid-workspaces

Implement pid->workspace tracking
This commit is contained in:
Drew DeVault 2018-07-24 14:44:01 -04:00 committed by GitHub
commit 817d37c950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 155 additions and 32 deletions

View file

@ -1,6 +1,5 @@
#ifndef _SWAY_CONFIG_H
#define _SWAY_CONFIG_H
#define PID_WORKSPACE_TIMEOUT 60
#include <libinput.h>
#include <stdint.h>
#include <string.h>
@ -161,12 +160,6 @@ struct workspace_output {
char *workspace;
};
struct pid_workspace {
pid_t *pid;
char *workspace;
time_t *time_added;
};
struct bar_config {
/**
* One of "dock", "hide", "invisible"
@ -317,7 +310,6 @@ struct sway_config {
list_t *bars;
list_t *cmd_queue;
list_t *workspace_outputs;
list_t *pid_workspaces;
list_t *output_configs;
list_t *input_configs;
list_t *seat_configs;
@ -403,9 +395,6 @@ struct sway_config {
} handler_context;
};
void pid_workspace_add(struct pid_workspace *pw);
void free_pid_workspace(struct pid_workspace *pw);
/**
* Loads the main config from the given path. is_active should be true when
* reloading the config.