X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=spectrwm.c;h=62d278269641cb4bd2bf59b0e3feb59810156ce2;hb=75353df79ed5aa6146d5b62dd83de594d1475973;hp=91a342da9cf3cab018248aeba6bb604c39bcee98;hpb=90f1696b7ae39741aad2a36720bed02f9eac8b25;p=spectrwm.git diff --git a/spectrwm.c b/spectrwm.c index 91a342d..62d2782 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -124,6 +124,7 @@ static const char *buildstr = SPECTRWM_VERSION; #if defined(__OpenBSD__) #define xcb_icccm_wm_hints_t xcb_wm_hints_t #define xcb_icccm_get_wm_hints xcb_get_wm_hints +#define xcb_icccm_get_wm_hints_reply xcb_get_wm_hints_reply #define XCB_ICCCM_WM_HINT_X_URGENCY XCB_WM_HINT_X_URGENCY #define XCB_ICCCM_WM_STATE_ICONIC XCB_WM_STATE_ICONIC #define XCB_ICCCM_WM_STATE_WITHDRAWN XCB_WM_STATE_WITHDRAWN @@ -2243,11 +2244,11 @@ fake_keypress(struct ws_win *win, xcb_keysym_t keysym, uint16_t modifiers) event.state = modifiers; event.response_type = XCB_KEY_PRESS; - xcb_send_event(conn, win->id, True, + xcb_send_event(conn, True, win->id, XCB_EVENT_MASK_KEY_PRESS, (char *)&event); event.response_type = XCB_KEY_RELEASE; - xcb_send_event(conn, win->id, True, + xcb_send_event(conn, True, win->id, XCB_EVENT_MASK_KEY_RELEASE, (char *)&event); xcb_flush(conn); @@ -7306,8 +7307,8 @@ scan_xrandr(int i) #endif /* SWM_XRR_HAS_CRTC */ struct swm_region *r; int num_screens; - xcb_randr_get_screen_resources_cookie_t src; - xcb_randr_get_screen_resources_reply_t *srr; + xcb_randr_get_screen_resources_current_cookie_t src; + xcb_randr_get_screen_resources_current_reply_t *srr; xcb_randr_get_crtc_info_cookie_t cic; xcb_randr_get_crtc_info_reply_t *cir = NULL; xcb_randr_crtc_t *crtc; @@ -7328,8 +7329,10 @@ scan_xrandr(int i) /* map virtual screens onto physical screens */ #ifdef SWM_XRR_HAS_CRTC if (xrandr_support) { - src = xcb_randr_get_screen_resources(conn, screens[i].root); - srr = xcb_randr_get_screen_resources_reply(conn, src, NULL); + src = xcb_randr_get_screen_resources_current(conn, + screens[i].root); + srr = xcb_randr_get_screen_resources_current_reply(conn, src, + NULL); if (srr == NULL) new_region(&screens[i], 0, 0, DisplayWidth(display, i), @@ -7337,7 +7340,7 @@ scan_xrandr(int i) else ncrtc = srr->num_crtcs; for (c = 0; c < ncrtc; c++) { - crtc = xcb_randr_get_screen_resources_crtcs(srr); + crtc = xcb_randr_get_screen_resources_current_crtcs(srr); cic = xcb_randr_get_crtc_info(conn, crtc[c], XCB_CURRENT_TIME); cir = xcb_randr_get_crtc_info_reply(conn, cic, NULL);