bool is a real type

This commit is contained in:
Ivan Kanakarakis 2012-09-30 18:41:28 +03:00
parent 962403f325
commit e31accb4b8
9 changed files with 7 additions and 18 deletions

View file

@ -12,7 +12,6 @@
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include <xcb/xcb_ewmh.h>
#include "helpers.h"
#include "types.h"
#include "settings.h"
#include "messages.h"

View file

@ -4,7 +4,6 @@
#include <xcb/xcb.h>
#include <xcb/xcb_icccm.h>
#include <xcb/xcb_event.h>
#include "helpers.h"
#include "types.h"
#include "bspwm.h"
#include "settings.h"
@ -73,7 +72,7 @@ void map_request(xcb_generic_event_t *evt)
handle_rules(win, &floating, &transient, &fullscreen, &takes_focus);
xcb_icccm_get_wm_class_reply_t reply;
xcb_icccm_get_wm_class_reply_t reply;
if (xcb_icccm_get_wm_class_reply(dpy, xcb_icccm_get_wm_class(dpy, win), &reply, NULL) == 1) {
strncpy(c->class_name, reply.class_name, sizeof(c->class_name));
xcb_icccm_get_wm_class_reply_wipe(&reply);

View file

@ -18,9 +18,4 @@
# define PRINTF(x) ;
#endif
typedef enum {
false,
true
} bool;
#endif

View file

@ -1,7 +1,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "helpers.h"
#include "settings.h"
#include "messages.h"
#include "common.h"

View file

@ -4,8 +4,6 @@
#include <unistd.h>
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include "helpers.h"
#include "types.h"
#include "bspwm.h"
#include "misc.h"
#include "common.h"
@ -25,7 +23,7 @@ void run_autostart(void)
setsid();
execl(path, path, NULL);
PUTS("error: could not load autostart file");
exit(EXIT_SUCCESS);
}

View file

@ -3,7 +3,7 @@
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include "helpers.h"
#include "types.h"
#define WM_NAME "bspwm"
#define CONFIG_FILE "bspwmrc"

7
tree.c
View file

@ -5,7 +5,6 @@
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include "settings.h"
#include "helpers.h"
#include "misc.h"
#include "window.h"
#include "types.h"
@ -133,7 +132,7 @@ void move_fence(node_t *n, direction_t dir, fence_move_t mov)
if (fence == NULL)
return;
if ((mov == MOVE_PUSH && (dir == DIR_RIGHT || dir == DIR_DOWN))
if ((mov == MOVE_PUSH && (dir == DIR_RIGHT || dir == DIR_DOWN))
|| (mov == MOVE_PULL && (dir == DIR_LEFT || dir == DIR_UP)))
change_split_ratio(fence, CHANGE_INCREASE);
else
@ -169,7 +168,7 @@ void rotate_tree(node_t *n, rotate_t rot)
void magnetise_tree(node_t *n, corner_t corner)
{
if (n == NULL || is_leaf(n))
if (n == NULL || is_leaf(n))
return;
PUTS("magnetise tree");
@ -206,7 +205,7 @@ void dump_tree(desktop_t *d, node_t *n, char *rsp, int depth)
strcat(rsp, " ");
if (is_leaf(n))
sprintf(line, "%s %X %s%s%s%s%s", n->client->class_name, n->client->window, (n->client->floating ? "f" : "-"), (n->client->transient ? "t" : "-"), (n->client->fullscreen ? "F" : "-"), (n->client->urgent ? "u" : "-"), (n->client->locked ? "l" : "-"));
sprintf(line, "%s %X %s%s%s%s%s", n->client->class_name, n->client->window, (n->client->floating ? "f" : "-"), (n->client->transient ? "t" : "-"), (n->client->fullscreen ? "F" : "-"), (n->client->urgent ? "u" : "-"), (n->client->locked ? "l" : "-"));
else
sprintf(line, "%s %.2f", (n->split_type == TYPE_HORIZONTAL ? "H" : "V"), n->split_ratio);

View file

@ -1,6 +1,7 @@
#ifndef _TYPES_H
#define _TYPES_H
#include <stdbool.h>
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include "helpers.h"

View file

@ -4,7 +4,6 @@
#include <string.h>
#include <xcb/xcb.h>
#include <xcb/xcb_event.h>
#include "helpers.h"
#include "types.h"
#include "tree.h"
#include "bspwm.h"