Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
drag_pointer(): drop unused parameter border
Browse files Browse the repository at this point in the history
  • Loading branch information
xzfc committed Oct 3, 2019
1 parent 454473a commit 2795c51
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/drag.h
Expand Up @@ -51,5 +51,5 @@ typedef enum {
*
*/
drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event,
xcb_window_t confine_to, border_t border, int cursor,
xcb_window_t confine_to, int cursor,
callback_t callback, const void *extra);
2 changes: 1 addition & 1 deletion src/drag.c
Expand Up @@ -138,7 +138,7 @@ static void xcb_drag_prepare_cb(EV_P_ ev_prepare *w, int revents) {
*
*/
drag_result_t drag_pointer(Con *con, const xcb_button_press_event_t *event, xcb_window_t confine_to,
border_t border, int cursor, callback_t callback, const void *extra) {
int cursor, callback_t callback, const void *extra) {
xcb_cursor_t xcursor = (cursor && xcursor_supported) ? xcursor_get_cursor(cursor) : XCB_NONE;

/* Grab the pointer */
Expand Down
4 changes: 2 additions & 2 deletions src/floating.c
Expand Up @@ -595,7 +595,7 @@ void floating_drag_window(Con *con, const xcb_button_press_event_t *event) {
Rect initial_rect = con->rect;

/* Drag the window */
drag_result_t drag_result = drag_pointer(con, event, XCB_NONE, BORDER_TOP /* irrelevant */, XCURSOR_CURSOR_MOVE, drag_window_callback, event);
drag_result_t drag_result = drag_pointer(con, event, XCB_NONE, XCURSOR_CURSOR_MOVE, drag_window_callback, event);

if (!con_exists(con)) {
DLOG("The container has been closed in the meantime.\n");
Expand Down Expand Up @@ -711,7 +711,7 @@ void floating_resize_window(Con *con, const bool proportional,
/* get the initial rect in case of revert/cancel */
Rect initial_rect = con->rect;

drag_result_t drag_result = drag_pointer(con, event, XCB_NONE, BORDER_TOP /* irrelevant */, cursor, resize_window_callback, &params);
drag_result_t drag_result = drag_pointer(con, event, XCB_NONE, cursor, resize_window_callback, &params);

if (!con_exists(con)) {
DLOG("The container has been closed in the meantime.\n");
Expand Down
2 changes: 1 addition & 1 deletion src/resize.c
Expand Up @@ -208,7 +208,7 @@ void resize_graphical_handler(Con *first, Con *second, orientation_t orientation
const struct callback_params params = {orientation, output, helpwin, &new_position};

/* `drag_pointer' blocks until the drag is completed. */
drag_result_t drag_result = drag_pointer(NULL, event, grabwin, BORDER_TOP, 0, resize_callback, &params);
drag_result_t drag_result = drag_pointer(NULL, event, grabwin, 0, resize_callback, &params);

xcb_destroy_window(conn, helpwin);
xcb_destroy_window(conn, grabwin);
Expand Down

0 comments on commit 2795c51

Please sign in to comment.