mirror of
https://github.com/vale981/bspwm
synced 2025-03-05 18:01:37 -05:00
bool is a real type
This commit is contained in:
parent
962403f325
commit
e31accb4b8
9 changed files with 7 additions and 18 deletions
1
bspwm.c
1
bspwm.c
|
@ -12,7 +12,6 @@
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include <xcb/xcb_ewmh.h>
|
#include <xcb/xcb_ewmh.h>
|
||||||
#include "helpers.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "messages.h"
|
#include "messages.h"
|
||||||
|
|
3
events.c
3
events.c
|
@ -4,7 +4,6 @@
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_icccm.h>
|
#include <xcb/xcb_icccm.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include "helpers.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "bspwm.h"
|
#include "bspwm.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
|
@ -73,7 +72,7 @@ void map_request(xcb_generic_event_t *evt)
|
||||||
|
|
||||||
handle_rules(win, &floating, &transient, &fullscreen, &takes_focus);
|
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) {
|
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));
|
strncpy(c->class_name, reply.class_name, sizeof(c->class_name));
|
||||||
xcb_icccm_get_wm_class_reply_wipe(&reply);
|
xcb_icccm_get_wm_class_reply_wipe(&reply);
|
||||||
|
|
|
@ -18,9 +18,4 @@
|
||||||
# define PRINTF(x) ;
|
# define PRINTF(x) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
false,
|
|
||||||
true
|
|
||||||
} bool;
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "helpers.h"
|
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "messages.h"
|
#include "messages.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include "helpers.h"
|
|
||||||
#include "types.h"
|
|
||||||
#include "bspwm.h"
|
#include "bspwm.h"
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
@ -25,7 +23,7 @@ void run_autostart(void)
|
||||||
|
|
||||||
setsid();
|
setsid();
|
||||||
execl(path, path, NULL);
|
execl(path, path, NULL);
|
||||||
|
|
||||||
PUTS("error: could not load autostart file");
|
PUTS("error: could not load autostart file");
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include "helpers.h"
|
#include "types.h"
|
||||||
|
|
||||||
#define WM_NAME "bspwm"
|
#define WM_NAME "bspwm"
|
||||||
#define CONFIG_FILE "bspwmrc"
|
#define CONFIG_FILE "bspwmrc"
|
||||||
|
|
7
tree.c
7
tree.c
|
@ -5,7 +5,6 @@
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "helpers.h"
|
|
||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
#include "window.h"
|
#include "window.h"
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
|
@ -133,7 +132,7 @@ void move_fence(node_t *n, direction_t dir, fence_move_t mov)
|
||||||
if (fence == NULL)
|
if (fence == NULL)
|
||||||
return;
|
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)))
|
|| (mov == MOVE_PULL && (dir == DIR_LEFT || dir == DIR_UP)))
|
||||||
change_split_ratio(fence, CHANGE_INCREASE);
|
change_split_ratio(fence, CHANGE_INCREASE);
|
||||||
else
|
else
|
||||||
|
@ -169,7 +168,7 @@ void rotate_tree(node_t *n, rotate_t rot)
|
||||||
|
|
||||||
void magnetise_tree(node_t *n, corner_t corner)
|
void magnetise_tree(node_t *n, corner_t corner)
|
||||||
{
|
{
|
||||||
if (n == NULL || is_leaf(n))
|
if (n == NULL || is_leaf(n))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
PUTS("magnetise tree");
|
PUTS("magnetise tree");
|
||||||
|
@ -206,7 +205,7 @@ void dump_tree(desktop_t *d, node_t *n, char *rsp, int depth)
|
||||||
strcat(rsp, " ");
|
strcat(rsp, " ");
|
||||||
|
|
||||||
if (is_leaf(n))
|
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
|
else
|
||||||
sprintf(line, "%s %.2f", (n->split_type == TYPE_HORIZONTAL ? "H" : "V"), n->split_ratio);
|
sprintf(line, "%s %.2f", (n->split_type == TYPE_HORIZONTAL ? "H" : "V"), n->split_ratio);
|
||||||
|
|
||||||
|
|
1
types.h
1
types.h
|
@ -1,6 +1,7 @@
|
||||||
#ifndef _TYPES_H
|
#ifndef _TYPES_H
|
||||||
#define _TYPES_H
|
#define _TYPES_H
|
||||||
|
|
||||||
|
#include <stdbool.h>
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include "helpers.h"
|
#include "helpers.h"
|
||||||
|
|
1
window.c
1
window.c
|
@ -4,7 +4,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <xcb/xcb.h>
|
#include <xcb/xcb.h>
|
||||||
#include <xcb/xcb_event.h>
|
#include <xcb/xcb_event.h>
|
||||||
#include "helpers.h"
|
|
||||||
#include "types.h"
|
#include "types.h"
|
||||||
#include "tree.h"
|
#include "tree.h"
|
||||||
#include "bspwm.h"
|
#include "bspwm.h"
|
||||||
|
|
Loading…
Add table
Reference in a new issue