Merge pull request #3369 from orestisf1993/clang-format

Apply compatible changes from clang-format 6.0.1
This commit is contained in:
Ingo Bürk 2018-08-22 20:29:32 +02:00 committed by GitHub
commit 72cc719c5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 14 deletions

View File

@ -951,13 +951,12 @@ int main(int argc, char *argv[]) {
/* Strip off the highest bit (set if the event is generated) */ /* Strip off the highest bit (set if the event is generated) */
int type = (event->response_type & 0x7F); int type = (event->response_type & 0x7F);
/* TODO: handle mappingnotify */
switch (type) { switch (type) {
case XCB_KEY_PRESS: case XCB_KEY_PRESS:
handle_key_press(NULL, conn, (xcb_key_press_event_t *)event); handle_key_press(NULL, conn, (xcb_key_press_event_t *)event);
break; break;
/* TODO: handle mappingnotify */
case XCB_BUTTON_PRESS: case XCB_BUTTON_PRESS:
handle_button_press((xcb_button_press_event_t *)event); handle_button_press((xcb_button_press_event_t *)event);
break; break;

View File

@ -60,8 +60,7 @@ uint32_t get_colorpixel(const char *hex) {
xcb_alloc_color_reply_t *reply; xcb_alloc_color_reply_t *reply;
reply = xcb_alloc_color_reply(conn, xcb_alloc_color(conn, root_screen->default_colormap, reply = xcb_alloc_color_reply(conn, xcb_alloc_color(conn, root_screen->default_colormap, r16, g16, b16),
r16, g16, b16),
NULL); NULL);
if (!reply) { if (!reply) {

View File

@ -791,8 +791,7 @@ static void xcb_drag_prepare_cb(EV_P_ ev_prepare *w, int revents) {
* rect of the client, the event and the new coordinates (x, y). * rect of the client, the event and the new coordinates (x, y).
* *
*/ */
drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t confine_to,
confine_to,
border_t border, int cursor, callback_t callback, const void *extra) { border_t border, int cursor, callback_t callback, const void *extra) {
xcb_cursor_t xcursor = (cursor && xcursor_supported) ? xcursor_get_cursor(cursor) : XCB_NONE; xcb_cursor_t xcursor = (cursor && xcursor_supported) ? xcursor_get_cursor(cursor) : XCB_NONE;

View File

@ -1141,8 +1141,7 @@ static bool handle_transient_for(void *data, xcb_connection_t *conn, uint8_t sta
} }
if (prop == NULL) { if (prop == NULL) {
prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, false, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 32),
false, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 32),
NULL); NULL);
if (prop == NULL) if (prop == NULL)
return false; return false;
@ -1165,8 +1164,7 @@ static bool handle_clientleader_change(void *data, xcb_connection_t *conn, uint8
return false; return false;
if (prop == NULL) { if (prop == NULL) {
prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, false, window, A_WM_CLIENT_LEADER, XCB_ATOM_WINDOW, 0, 32),
false, window, A_WM_CLIENT_LEADER, XCB_ATOM_WINDOW, 0, 32),
NULL); NULL);
if (prop == NULL) if (prop == NULL)
return false; return false;
@ -1266,8 +1264,7 @@ static bool handle_class_change(void *data, xcb_connection_t *conn, uint8_t stat
return false; return false;
if (prop == NULL) { if (prop == NULL) {
prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, false, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0, 32),
false, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0, 32),
NULL); NULL);
if (prop == NULL) if (prop == NULL)
@ -1290,8 +1287,7 @@ static bool handle_motif_hints_change(void *data, xcb_connection_t *conn, uint8_
return false; return false;
if (prop == NULL) { if (prop == NULL) {
prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, false, window, A__MOTIF_WM_HINTS, XCB_GET_PROPERTY_TYPE_ANY, 0, 5 * sizeof(uint64_t)),
false, window, A__MOTIF_WM_HINTS, XCB_GET_PROPERTY_TYPE_ANY, 0, 5 * sizeof(uint64_t)),
NULL); NULL);
if (prop == NULL) if (prop == NULL)