Skip to content

Commit

Permalink
Present Xserver extension: Enable build via imake in nx-libs.
Browse files Browse the repository at this point in the history
  • Loading branch information
sunweaver committed Apr 11, 2017
1 parent 3f746a1 commit d679120
Show file tree
Hide file tree
Showing 10 changed files with 80 additions and 7 deletions.
3 changes: 3 additions & 0 deletions nx-X11/config/cf/X11.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ XORGRELSTRING = XorgManVersionString
#ifndef BuildRender
#define BuildRender YES
#endif
#ifndef BuildPresent
#define BuildPresent YES
#endif

#ifndef BuildRandR
#define BuildRandR YES
Expand Down
5 changes: 5 additions & 0 deletions nx-X11/config/cf/xorg.cf
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define BuildRender YES
#endif

/* Build Present extension */
#ifndef BuildPresent
# define BuildPresent YES
#endif

#if 0
#ifndef JoystickSupport
# define JoystickSupport NO
Expand Down
4 changes: 4 additions & 0 deletions nx-X11/include/extensions/Imakefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ RANDRHEADERS = randr.h randrproto.h
#if BuildRender
RENDERHEADERS = render.h renderproto.h
#endif
#if BuildPresent
PRESENTHEADERS = presentproto.h presenttokens.h
#endif
#if BuildXfixes
XFIXESHEADERS = xfixeswire.h xfixesproto.h
#endif
Expand All @@ -43,6 +46,7 @@ EXTRAHEADERS = \
$(XVMCHEADERS) \
$(RANDRHEADERS) \
$(RENDERHEADERS) \
$(PRESENTHEADERS) \
$(XFIXESHEADERS) \
$(COMPOSITEHEADERS) \
$(DAMAGEHEADERS) \
Expand Down
2 changes: 1 addition & 1 deletion nx-X11/include/extensions/presentproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef _PRESENT_PROTO_H_
#define _PRESENT_PROTO_H_

#include <X11/extensions/presenttokens.h>
#include <nx-X11/extensions/presenttokens.h>

#define Window CARD32
#define Pixmap CARD32
Expand Down
12 changes: 10 additions & 2 deletions nx-X11/programs/Xserver/Imakefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ INSTPGMFLAGS =
#if BuildDBE
DBEDIR = dbe
#endif
#if BuildPresent
PRESENTEXT = present/LibraryTargetName(present)
PRESENTDIR = present
#endif
#if BuildRECORD
RECORDEXT = record/LibraryTargetName(record)
#endif
Expand All @@ -105,6 +109,10 @@ INSTPGMFLAGS =
RENDERDIR = render
RENDERLIB = $(RENDERDIR)/librender.a
#endif
#if BuildPresent
PRESENTDIR = present
PRESENTEXT = present/LibraryTargetName(present)
#endif
#if BuildRandR
RANDRDIR = randr
RANDRLIB = $(RANDRDIR)/librandr.a
Expand All @@ -124,11 +132,11 @@ INSTPGMFLAGS =
CW = miext/cw/LibraryTargetName(cw)
#endif
EXTENSIONS = $(COMPOSITELIB) $(DAMAGELIB) $(DAMAGE) $(FIXESLIB) $(CW) \
$(OTHEREXTS) $(GLXEXT) $(RANDRLIB) $(RENDERLIB)
$(OTHEREXTS) $(GLXEXT) $(PRESENTEXT) $(RANDRLIB) $(RENDERLIB)
OTHEREXTS = Xext/LibraryTargetName(ext) $(XKBEXT) $(XINPUTEXT) \
$(DBEEXT) $(RECORDEXT) $(SITEEXTS)
EXTDIRS = Xext $(XKBDIR) $(XIDIR) $(GLXDIR) \
$(DBEDIR) $(RECORDDIR) $(SITEEXTDIRS) \
$(DBEDIR) $(PRESENTDIR) $(RECORDDIR) $(SITEEXTDIRS) \
$(RANDRDIR) $(RENDERDIR) $(XPCONFIGDIR) \
$(FIXESDIR) $(DAMAGEDIR) $(CWDIR) $(COMPOSITEDIR)
OS = os/LibraryTargetName(os)
Expand Down
2 changes: 0 additions & 2 deletions nx-X11/programs/Xserver/include/protocol-versions.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@
#define SERVER_PANORAMIX_MAJOR_VERSION 1
#define SERVER_PANORAMIX_MINOR_VERSION 1

#ifndef NXAGENT_SERVER
/* Present */
#define SERVER_PRESENT_MAJOR_VERSION 1
#define SERVER_PRESENT_MINOR_VERSION 0
#endif /* !defined(NXAGENT_SERVER) */

/* RandR */
#define SERVER_RANDR_MAJOR_VERSION 1
Expand Down
6 changes: 6 additions & 0 deletions nx-X11/programs/Xserver/mi/miinitext.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,9 @@ extern void XFree86DRIExtensionInit(void);
#ifdef DPMSExtension
extern void DPMSExtensionInit(void);
#endif
#ifdef PRESENT
extern void present_extension_init(void);
#endif
#ifdef DPSEXT
extern void DPSExtensionInit(void);
#endif
Expand Down Expand Up @@ -292,6 +295,9 @@ static ExtensionToggle ExtensionToggleList[] =
#ifdef DPMSExtension
{ "DPMS", &noDPMSExtension },
#endif
#ifdef PRESENT
{ "Present", &noPresentExtension },
#endif
#ifdef GLXEXT
{ "GLX", &noGlxExtension },
#endif
Expand Down
49 changes: 49 additions & 0 deletions nx-X11/programs/Xserver/present/Imakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
NULL =

#include <Server.tmpl>

SRCS = \
present.c \
present_event.c \
present_fake.c \
present_fence.c \
present_notify.c \
present_request.c \
present_screen.c \
$(NULL)
OBJS = \
present.o \
present_event.o \
present_fake.o \
present_fence.o \
present_notify.o \
present_request.o \
present_screen.o \
$(NULL)
INCLUDES = \
-I$(SERVERSRC)/include \
-I$(SERVERSRC)/randr \
-I$(SERVERSRC)/render \
-I$(XINCLUDESRC) \
-I$(EXTINCSRC) \
`pkg-config --cflags-only-I pixman-1` \
$(NULL)

LINTLIBS = \
../dix/llib-ldix.ln \
../os/llib-los.ln \
$(NULL)

RESENT_DEFINES = \
-DPRESENT_FUTURE_VERSION=0 \
$(NULL)

NormalLibraryObjectRule()

NormalLibraryTarget(present,$(OBJS))

LintLibraryTarget(present,$(SRCS))
NormalLintTarget($(SRCS))


DependTarget()
2 changes: 1 addition & 1 deletion nx-X11/programs/Xserver/present/present.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef _PRESENT_H_
#define _PRESENT_H_

#include <X11/extensions/presentproto.h>
#include <nx-X11/extensions/presentproto.h>
#include "randrstr.h"
#include "presentext.h"

Expand Down
2 changes: 1 addition & 1 deletion nx-X11/programs/Xserver/present/present_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#ifndef _PRESENT_PRIV_H_
#define _PRESENT_PRIV_H_

#include <X11/X.h>
#include <nx-X11/X.h>
#include "scrnintstr.h"
#include "misc.h"
#include "list.h"
Expand Down

0 comments on commit d679120

Please sign in to comment.