mirror of
https://github.com/vale981/spectrwm
synced 2025-03-04 17:31:40 -05:00
Fix cygwin compile issues.
This commit is contained in:
parent
64bee8acfc
commit
71e41a8cd9
3 changed files with 23 additions and 5 deletions
|
@ -63,7 +63,7 @@ static Atom swmws = None, swmpid = None;
|
|||
void set_property(Display *, Window, Atom, char *);
|
||||
Atom get_atom_from_string(Display *, char *);
|
||||
|
||||
#ifdef _GNU_SOURCE
|
||||
#if defined(_GNU_SOURCE) && !defined(__CYGWIN__)
|
||||
#define DLOPEN(s) RTLD_NEXT
|
||||
#else
|
||||
#define DLOPEN(s) dlopen((s), RTLD_GLOBAL | RTLD_LAZY)
|
||||
|
|
16
linux/util.h
16
linux/util.h
|
@ -28,3 +28,19 @@ long long strtonum(const char *, long long, long long, const char **);
|
|||
((tvar) = TAILQ_NEXT(var, field), 1); \
|
||||
(var) = (tvar))
|
||||
#endif
|
||||
|
||||
#ifndef SIMPLEQ_HEAD
|
||||
#define SIMPLEQ_HEAD STAILQ_HEAD
|
||||
#define SIMPLEQ_HEAD_INITIALIZER STAILQ_HEAD_INITIALIZER
|
||||
#define SIMPLEQ_ENTRY STAILQ_ENTRY
|
||||
#define SIMPLEQ_INIT STAILQ_INIT
|
||||
#define SIMPLEQ_INSERT_AFTER STAILQ_INSERT_AFTER
|
||||
#define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD
|
||||
#define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL
|
||||
#define SIMPLEQ_EMPTY STAILQ_EMPTY
|
||||
#define SIMPLEQ_FIRST STAILQ_FIRST
|
||||
#define SIMPLEQ_REMOVE_AFTER STAILQ_REMOVE_AFTER
|
||||
#define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD
|
||||
#define SIMPLEQ_FOREACH STAILQ_FOREACH
|
||||
#define SIMPLEQ_END(head) NULL
|
||||
#endif
|
||||
|
|
10
spectrwm.c
10
spectrwm.c
|
@ -12503,17 +12503,17 @@ scan_randr(int idx)
|
|||
#ifdef SWM_XRR_HAS_CRTC
|
||||
int i, j;
|
||||
int ncrtc = 0, nmodes = 0;
|
||||
#endif /* SWM_XRR_HAS_CRTC */
|
||||
struct swm_region *r;
|
||||
int num_screens;
|
||||
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;
|
||||
xcb_randr_mode_info_t *mode;
|
||||
xcb_screen_t *screen;
|
||||
int minrate, currate;
|
||||
#endif /* SWM_XRR_HAS_CRTC */
|
||||
struct swm_region *r;
|
||||
int num_screens;
|
||||
xcb_screen_t *screen;
|
||||
|
||||
DNPRINTF(SWM_D_MISC, "screen: %d\n", idx);
|
||||
|
||||
|
@ -12606,7 +12606,9 @@ scan_randr(int idx)
|
|||
new_region(&screens[idx], 0, 0, screen->width_in_pixels,
|
||||
screen->height_in_pixels);
|
||||
|
||||
#ifdef SWM_XRR_HAS_CRTC
|
||||
out:
|
||||
#endif
|
||||
/* The screen shouldn't focus on unused regions. */
|
||||
TAILQ_FOREACH(r, &screens[idx].orl, entry) {
|
||||
if (screens[idx].r_focus == r)
|
||||
|
|
Loading…
Add table
Reference in a new issue