Apply compatible changes from clang-format 6.0.1
These are the changes that clang-format 6.0.1 makes to the codebase that
clang-format-3.8 doesn't change back.
Useful for those that use a more recent version of clang-format in their
local machines.
Orestis Floros
5 years ago
950 | 950 | /* Strip off the highest bit (set if the event is generated) */ |
951 | 951 | int type = (event->response_type & 0x7F); |
952 | 952 | |
953 | /* TODO: handle mappingnotify */ | |
953 | 954 | switch (type) { |
954 | 955 | case XCB_KEY_PRESS: |
955 | 956 | handle_key_press(NULL, conn, (xcb_key_press_event_t *)event); |
956 | 957 | break; |
957 | 958 | |
958 | /* TODO: handle mappingnotify */ | |
959 | ||
960 | 959 | case XCB_BUTTON_PRESS: |
961 | 960 | handle_button_press((xcb_button_press_event_t *)event); |
962 | 961 | break; |
59 | 59 | |
60 | 60 | xcb_alloc_color_reply_t *reply; |
61 | 61 | |
62 | reply = xcb_alloc_color_reply(conn, xcb_alloc_color(conn, root_screen->default_colormap, | |
63 | r16, g16, b16), | |
62 | reply = xcb_alloc_color_reply(conn, xcb_alloc_color(conn, root_screen->default_colormap, r16, g16, b16), | |
64 | 63 | NULL); |
65 | 64 | |
66 | 65 | if (!reply) { |
790 | 790 | * rect of the client, the event and the new coordinates (x, y). |
791 | 791 | * |
792 | 792 | */ |
793 | drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t | |
794 | confine_to, | |
793 | drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t confine_to, | |
795 | 794 | border_t border, int cursor, callback_t callback, const void *extra) { |
796 | 795 | xcb_cursor_t xcursor = (cursor && xcursor_supported) ? xcursor_get_cursor(cursor) : XCB_NONE; |
797 | 796 |
1140 | 1140 | } |
1141 | 1141 | |
1142 | 1142 | if (prop == NULL) { |
1143 | prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, | |
1144 | false, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 32), | |
1143 | prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, false, window, XCB_ATOM_WM_TRANSIENT_FOR, XCB_ATOM_WINDOW, 0, 32), | |
1145 | 1144 | NULL); |
1146 | 1145 | if (prop == NULL) |
1147 | 1146 | return false; |
1164 | 1163 | return false; |
1165 | 1164 | |
1166 | 1165 | if (prop == NULL) { |
1167 | prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, | |
1168 | false, window, A_WM_CLIENT_LEADER, XCB_ATOM_WINDOW, 0, 32), | |
1166 | prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, false, window, A_WM_CLIENT_LEADER, XCB_ATOM_WINDOW, 0, 32), | |
1169 | 1167 | NULL); |
1170 | 1168 | if (prop == NULL) |
1171 | 1169 | return false; |
1265 | 1263 | return false; |
1266 | 1264 | |
1267 | 1265 | if (prop == NULL) { |
1268 | prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, | |
1269 | false, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0, 32), | |
1266 | prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, false, window, XCB_ATOM_WM_CLASS, XCB_ATOM_STRING, 0, 32), | |
1270 | 1267 | NULL); |
1271 | 1268 | |
1272 | 1269 | if (prop == NULL) |
1289 | 1286 | return false; |
1290 | 1287 | |
1291 | 1288 | if (prop == NULL) { |
1292 | prop = xcb_get_property_reply(conn, xcb_get_property_unchecked(conn, | |
1293 | false, window, A__MOTIF_WM_HINTS, XCB_GET_PROPERTY_TYPE_ANY, 0, 5 * sizeof(uint64_t)), | |
1289 | 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)), | |
1294 | 1290 | NULL); |
1295 | 1291 | |
1296 | 1292 | if (prop == NULL) |