Commit a91e34a8 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Imakefile: make NXAGENT_RANDR_MODE_PREFIX configurable via macro

parent 3b94b9c6
......@@ -207,7 +207,7 @@ INCLUDES = \
# NXAGENT_SHAPE2 New shape code
# NXAGENT_FIXKEYS Force the release of pressed key when losing focus
# NXAGENT_CLIPBOARD Enables clipboard cut and paste function between X servers.
# NXAGENT_RANDR_MODE_PREFIX Use prefixed (i.e., nx_<x>x<y>) RandR modes
# NXAGENT_RANDR_MODE_PREFIX Prefix for RandR modes (i.e., nx_<x>x<y>) (default: nx_)
# NXAGENT_RANDR_XINERAMA_CLIPPING cut off invisible window parts in xinerama mode (you probably do not want this)
# NXAGENT_TIMESTAMP print duration for some routines
#
......@@ -259,7 +259,6 @@ DEFINES = \
-DNXAGENT_WAKEUP=1000 \
-DNXAGENT_ONSTART \
-DNXAGENT_ARTSD \
-DNXAGENT_RANDR_MODE_PREFIX \
-UNX_DEBUG_INPUT \
-DRANDR_10_INTERFACE=1 \
-DRANDR_12_INTERFACE=1 \
......
......@@ -210,6 +210,10 @@ RegionRec nxagentShadowUpdateRegion;
#define NXAGENT_DEFAULT_DPI 96
#define NXAGENT_AUTO_DPI -1
#ifndef NXAGENT_RANDR_MODE_PREFIX
#define NXAGENT_RANDR_MODE_PREFIX nx_
#endif
extern Bool nxagentAutoDPI;
/*
......@@ -4220,15 +4224,11 @@ int nxagentAdjustRandRXinerama(ScreenPtr pScreen)
memset(&modeInfo, '\0', sizeof(modeInfo));
#ifdef NXAGENT_RANDR_MODE_PREFIX
/* avoid collisions with pre-existing default modes by using a
separate namespace. If we'd simply use XxY we could not
distinguish between pre-existing modes which should stay
and our own modes that should be removed after use. */
sprintf(name, "nx_%dx%d", new_w, new_h);
#else
sprintf(name, "%dx%d", new_w, new_h);
#endif
sprintf(name, "%s%dx%d", QUOTE(NXAGENT_RANDR_MODE_PREFIX), new_w, new_h);
modeInfo.width = new_w;
modeInfo.height = new_h;
......
......@@ -47,4 +47,8 @@ static inline const char * validateString(const char *str) {
#define SAFE_XFree(what) do {if (what) {XFree(what); what = NULL;}} while (0)
#define SAFE_free(what) do {free(what); what = NULL;} while (0)
/* some helper macros to produce a quoted string from other macros */
#define QUOTEEXP(str) #str
#define QUOTE(str) QUOTEEXP(str)
#endif /* __Utils_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment