remove unused variables and functions
This commit is contained in:
parent
ee88d8a600
commit
0b878dd9d7
@ -59,7 +59,6 @@ ret:
|
|||||||
Client* wm_client_create(Wm *wm, Window w)
|
Client* wm_client_create(Wm *wm, Window w)
|
||||||
{
|
{
|
||||||
DEBUG_PRINT("%s\n", __func__);
|
DEBUG_PRINT("%s\n", __func__);
|
||||||
Client *t;
|
|
||||||
XTextProperty xtp;
|
XTextProperty xtp;
|
||||||
int strln;
|
int strln;
|
||||||
|
|
||||||
@ -385,8 +384,6 @@ ret:
|
|||||||
|
|
||||||
Client* wm_client_get_focused(Wm *wm)
|
Client* wm_client_get_focused(Wm *wm)
|
||||||
{
|
{
|
||||||
Client *c = NULL;
|
|
||||||
|
|
||||||
Workspace *ws = &wm->smon->workspaces[wm->smon->selws];
|
Workspace *ws = &wm->smon->workspaces[wm->smon->selws];
|
||||||
TreeNode *node = wm_treenode_ptr_find_focused_client_node(ws->tree);
|
TreeNode *node = wm_treenode_ptr_find_focused_client_node(ws->tree);
|
||||||
|
|
||||||
|
@ -121,7 +121,6 @@ void wm_configfile_init(ConfigFile *config, const char *filename)
|
|||||||
assert(filename);
|
assert(filename);
|
||||||
|
|
||||||
strncpy(config->file_path, filename, PATH_MAX);
|
strncpy(config->file_path, filename, PATH_MAX);
|
||||||
const size_t size = CONFIG_ARGC_MAX*CONFIG_ARGLEN_MAX;
|
|
||||||
|
|
||||||
ConfigCommand commands[] = {
|
ConfigCommand commands[] = {
|
||||||
(ConfigCommand) {.string = "border_color", .arg_count = 1,
|
(ConfigCommand) {.string = "border_color", .arg_count = 1,
|
||||||
@ -176,7 +175,6 @@ void wm_configfile_read(ConfigFile *cfile, Config *config)
|
|||||||
|
|
||||||
const int max_line_len = 8192;
|
const int max_line_len = 8192;
|
||||||
char line[max_line_len];
|
char line[max_line_len];
|
||||||
char argv[CONFIG_ARGC_MAX][CONFIG_ARGLEN_MAX];
|
|
||||||
size_t line_index = 0;
|
size_t line_index = 0;
|
||||||
ConfigCommand command = {0};
|
ConfigCommand command = {0};
|
||||||
wm_configcommand_init(&command);
|
wm_configcommand_init(&command);
|
||||||
@ -201,8 +199,6 @@ void wm_configfile_read(ConfigFile *cfile, Config *config)
|
|||||||
|
|
||||||
void wm_config_apply_command(Config *config, ConfigCommand *command)
|
void wm_config_apply_command(Config *config, ConfigCommand *command)
|
||||||
{
|
{
|
||||||
void *arg = NULL;
|
|
||||||
|
|
||||||
switch (command->arg_type) {
|
switch (command->arg_type) {
|
||||||
case TYPE_INTEGER:
|
case TYPE_INTEGER:
|
||||||
for (size_t i = 0; i < command->argc; i++) {
|
for (size_t i = 0; i < command->argc; i++) {
|
||||||
|
@ -21,28 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include "wm.h"
|
#include "wm.h"
|
||||||
#include "client.h"
|
#include "client.h"
|
||||||
|
|
||||||
static int wm_xerror_handler(Wm *wm, Display *display, XErrorEvent *e)
|
|
||||||
{
|
|
||||||
printf("wm: Error occured. id: %d req_code: %d\n",
|
|
||||||
e->error_code, e->request_code);
|
|
||||||
|
|
||||||
char etext[200];
|
|
||||||
XGetErrorText(wm->display, e->error_code, etext, 200);
|
|
||||||
|
|
||||||
printf("%s\n", etext);
|
|
||||||
|
|
||||||
if (e->error_code == BadAccess) {
|
|
||||||
wm->other_wm = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int wm_other_wm_handler(Display *display, XErrorEvent *e)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void wm_create_handler(Wm *wm, XCreateWindowEvent e)
|
void wm_create_handler(Wm *wm, XCreateWindowEvent e)
|
||||||
{
|
{
|
||||||
DEBUG_PRINT("CreateNotify event\n");
|
DEBUG_PRINT("CreateNotify event\n");
|
||||||
@ -73,7 +51,6 @@ void wm_keyrelease_handler(XKeyReleasedEvent e)
|
|||||||
void wm_keypress_handler(Wm *wm, XKeyPressedEvent e)
|
void wm_keypress_handler(Wm *wm, XKeyPressedEvent e)
|
||||||
{
|
{
|
||||||
DEBUG_PRINT("KeyPressed event, code: %d\n", e.keycode)
|
DEBUG_PRINT("KeyPressed event, code: %d\n", e.keycode)
|
||||||
Client *c;
|
|
||||||
Keybind k;
|
Keybind k;
|
||||||
|
|
||||||
DEBUG_PRINT("wm->config.kb_count: %d\n", wm->config.kb_count);
|
DEBUG_PRINT("wm->config.kb_count: %d\n", wm->config.kb_count);
|
||||||
@ -144,8 +121,7 @@ void wm_configure_handler(Wm *wm, XConfigureRequestEvent e)
|
|||||||
{
|
{
|
||||||
DEBUG_PRINT("ConfigureRequest event\n");
|
DEBUG_PRINT("ConfigureRequest event\n");
|
||||||
|
|
||||||
Client *c;
|
XWindowChanges wc;
|
||||||
XWindowChanges wc;
|
|
||||||
|
|
||||||
wc.x = e.x;
|
wc.x = e.x;
|
||||||
wc.y = e.y;
|
wc.y = e.y;
|
||||||
|
@ -30,8 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
#include "wm.h"
|
#include "wm.h"
|
||||||
|
|
||||||
static int wm_xerror_handler(Wm *wm, Display *display, XErrorEvent *e);
|
|
||||||
static int wm_other_wm_handler(Display *display, XErrorEvent *e);
|
|
||||||
void wm_create_handler(Wm *wm, XCreateWindowEvent e);
|
void wm_create_handler(Wm *wm, XCreateWindowEvent e);
|
||||||
void wm_destroy_handler(Wm *wm, XDestroyWindowEvent e);
|
void wm_destroy_handler(Wm *wm, XDestroyWindowEvent e);
|
||||||
void wm_reparent_handler(XReparentEvent e);
|
void wm_reparent_handler(XReparentEvent e);
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
|
static unsigned int node_id = 0;
|
||||||
|
|
||||||
TreeNode* wm_treenode_new(NodeType type, TreeNode *parent)
|
TreeNode* wm_treenode_new(NodeType type, TreeNode *parent)
|
||||||
{
|
{
|
||||||
DEBUG_PRINT("%s\n", __func__);
|
DEBUG_PRINT("%s\n", __func__);
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
#define WM_HORIZ_TOP 0
|
#define WM_HORIZ_TOP 0
|
||||||
#define WM_HORIZ_BOT 1
|
#define WM_HORIZ_BOT 1
|
||||||
|
|
||||||
static unsigned int node_id = 0;
|
|
||||||
|
|
||||||
typedef enum NodeType {
|
typedef enum NodeType {
|
||||||
NODE_VERTICAL,
|
NODE_VERTICAL,
|
||||||
NODE_HORIZONTAL,
|
NODE_HORIZONTAL,
|
||||||
|
1
src/wm.c
1
src/wm.c
@ -629,7 +629,6 @@ void wm_settings_message_parse(Wm *wm, char *c, int len)
|
|||||||
|
|
||||||
int op; /* 0 = set, 1 = get */
|
int op; /* 0 = set, 1 = get */
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
char ret[50];
|
|
||||||
char *token;
|
char *token;
|
||||||
char tokens[20][50];
|
char tokens[20][50];
|
||||||
char *settings[] = {"border-width", "border-color", "focused-border-color",
|
char *settings[] = {"border-width", "border-color", "focused-border-color",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user