X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=window.c;h=b6d211fb108abc311289085a7be58579cb5fb84f;hb=b7fa4926020a53f211209907b256f06f0c04ffd9;hp=a6093fe3329017a0e12b0fd40bc143a2a58b5675;hpb=9f8f115534fdd60da03198a6eb053ea8ab39d5e3;p=bspwm.git diff --git a/window.c b/window.c index a6093fe..b6d211f 100644 --- a/window.c +++ b/window.c @@ -762,10 +762,10 @@ void clear_input_focus(void) xcb_set_input_focus(dpy, XCB_INPUT_FOCUS_POINTER_ROOT, root, XCB_CURRENT_TIME); } -void center_pointer(monitor_t *m) +void center_pointer(xcb_rectangle_t r) { - int16_t cx = m->rectangle.x + m->rectangle.width / 2; - int16_t cy = m->rectangle.y + m->rectangle.height / 2; + int16_t cx = r.x + r.width / 2; + int16_t cy = r.y + r.height / 2; window_lower(motion_recorder); xcb_warp_pointer(dpy, XCB_NONE, root, 0, 0, 0, 0, cx, cy); window_raise(motion_recorder);