format **/*.c with clang-format-3.5
This has multiple effects: 1) The i3 codebase is now consistently formatted. clang-format uncovered plenty of places where inconsistent code made it into our code base. 2) When writing code, you don’t need to think or worry about our coding style. Write it in yours, then run clang-format-3.5 3) When submitting patches, we don’t need to argue about coding style. The basic idea is that we don’t want to care about _how_ we write the code, but _what_ it does :). The coding style that we use is defined in the .clang-format config file and is based on the google style, but adapted in such a way that the number of modifications to the i3 code base is minimal.
This commit is contained in:
@ -23,8 +23,7 @@ static const int xcb_cursors[XCURSOR_CURSOR_MAX] = {
|
||||
XCB_CURSOR_LEFT_PTR,
|
||||
XCB_CURSOR_SB_H_DOUBLE_ARROW,
|
||||
XCB_CURSOR_SB_V_DOUBLE_ARROW,
|
||||
XCB_CURSOR_WATCH
|
||||
};
|
||||
XCB_CURSOR_WATCH};
|
||||
|
||||
void xcursor_load_cursors(void) {
|
||||
if (xcb_cursor_context_new(conn, root_screen, &ctx) < 0) {
|
||||
@ -32,8 +31,8 @@ void xcursor_load_cursors(void) {
|
||||
xcursor_supported = false;
|
||||
return;
|
||||
}
|
||||
#define LOAD_CURSOR(constant, name) \
|
||||
do { \
|
||||
#define LOAD_CURSOR(constant, name) \
|
||||
do { \
|
||||
cursors[constant] = xcb_cursor_load_cursor(ctx, name); \
|
||||
} while (0)
|
||||
LOAD_CURSOR(XCURSOR_CURSOR_POINTER, "left_ptr");
|
||||
@ -57,7 +56,7 @@ void xcursor_load_cursors(void) {
|
||||
*/
|
||||
void xcursor_set_root_cursor(int cursor_id) {
|
||||
xcb_change_window_attributes(conn, root, XCB_CW_CURSOR,
|
||||
(uint32_t[]){ xcursor_get_cursor(cursor_id) });
|
||||
(uint32_t[]) {xcursor_get_cursor(cursor_id)});
|
||||
}
|
||||
|
||||
xcb_cursor_t xcursor_get_cursor(enum xcursor_cursor_t c) {
|
||||
|
Reference in New Issue
Block a user