Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pr/big 1.4.2 upgrade v3 #902

Open
wants to merge 42 commits into
base: 3.6.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6b2de64
NXshm.c: call upstream ShmExtensionInit
uli42 May 30, 2019
80f3821
Lift xkb to xorg 1.4.2
uli42 Jul 7, 2018
b1c00e2
dix: remove register keyword
uli42 Nov 1, 2018
e009bb0
Lift dix to 1.4.2
uli42 Nov 1, 2018
82210ad
dix: fix typo in clipAxis.
uli42 Mar 19, 2019
8acbf60
devices.c: replace Ace by XC_security
uli42 Nov 2, 2018
75e8da5
Update include files to match Xi 1.4.2 requirements
uli42 Nov 1, 2018
fe6a118
Xi: reorder function to make future merges easier
uli42 Nov 1, 2018
78d6af3
Xi: remove register keywords
uli42 Nov 1, 2018
2106d60
Lift Xi to xorg 1.4.2
uli42 Nov 1, 2018
23cc44e
main.c: FIXME: comment InitRegions for now
uli42 Nov 2, 2018
ea55e36
update swaprep.h
uli42 Nov 2, 2018
66394a5
update window.h
uli42 Nov 2, 2018
607818b
make dispatch.c compile again
uli42 Nov 2, 2018
ac80d99
Keyboard.c: fix parameter type for LegalModifier
uli42 Nov 2, 2018
21723e6
Pointer.c: needs additional parameter (numAxes)
uli42 Nov 2, 2018
6c37a4e
Keyboard.c: add missing DDXRingBell
uli42 Nov 2, 2018
bd4d6d8
Lift mi to xorg 1.4.2
uli42 Nov 2, 2018
412c630
Lift miext to xorg 1.4.2
uli42 Nov 2, 2018
fffa9a3
nxagent: add Xi to include path
uli42 Jan 31, 2019
e30734f
Events.c Introduce nxagentQueueKeyEvent
uli42 Nov 2, 2018
c864af3
nxagent: introduce global nxagent{Keyboard,Pointer}Device
uli42 Nov 2, 2018
7f8a5bd
Events.c: update/replace all mieqEnqueue calls
uli42 Nov 2, 2018
1540168
Pointer.c: port to the new DIX motion history API
uli42 Nov 2, 2018
0fd3004
mi: remove miPointerUpdate() -> replaced by miPointerUpdateSprite().
uli42 Nov 7, 2018
71f668f
Xext: add missing SecurityExtensionSetup
uli42 Nov 7, 2018
d59c7ed
Lift damageext to xorg 1.4.2
uli42 Nov 6, 2018
c770558
Revert "misc nx-X11/programs/Xserver/{hw/nxagent,miext,render}/: move…
uli42 Nov 3, 2018
227af9c
Lift render to xorg 1.4.2
uli42 Nov 3, 2018
a51493a
Lift fb to xorg 1.4.2
uli42 Nov 3, 2018
a3f5d4d
Make files depending on render compile again
uli42 Nov 6, 2018
cadf97c
Add securitysrv.h
uli42 Mar 20, 2019
35701b3
Lift os to xorg 1.4.2
uli42 Nov 7, 2018
f7103be
dix: add missing InitRegions()
uli42 Apr 30, 2019
17b099d
NXdispatch.c: whitespace fixes
uli42 May 3, 2019
bfd84b4
NXdispatch.c: cleanup/update Dispatch()
uli42 May 3, 2019
074508d
NXglyph.c: update to latest changes in render/glyph.c
uli42 Jun 12, 2019
fcc22c9
xkb: use the correct device instead of an uninitialised "dev".
uli42 Jun 21, 2019
25975f8
Give names to the virtual devices
uli42 Jun 21, 2019
ee35df7
dix: avoid activating the VCP/VCK twice.
uli42 Jun 21, 2019
38282f6
Free xkb devPrivates on CloseDevice
uli42 Jun 21, 2019
bf5690c
fixup! NXdispatch.c: cleanup/update Dispatch()
uli42 Jan 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions nx-X11/include/extensions/XI.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ SOFTWARE.
#define XInput_Add_XDeviceBell 2
#define XInput_Add_XSetDeviceValuators 3
#define XInput_Add_XChangeDeviceControl 4
#define XInput_Add_DevicePresenceNotify 5

#define XI_Absent 0
#define XI_Present 1
Expand All @@ -151,7 +152,14 @@ SOFTWARE.
#define XI_Add_XChangeDeviceControl_Major 1
#define XI_Add_XChangeDeviceControl_Minor 3

#define XI_Add_DevicePresenceNotify_Major 1
#define XI_Add_DevicePresenceNotify_Minor 4

#define DEVICE_RESOLUTION 1
#define DEVICE_ABS_CALIB 2
#define DEVICE_CORE 3
#define DEVICE_ENABLE 4
#define DEVICE_ABS_AREA 5

#define NoSuchExtension 1

Expand All @@ -169,6 +177,8 @@ SOFTWARE.
#define IsXPointer 0
#define IsXKeyboard 1
#define IsXExtensionDevice 2
#define IsXExtensionKeyboard 3
#define IsXExtensionPointer 4

#define AsyncThisDevice 0
#define SyncThisDevice 1
Expand Down Expand Up @@ -202,12 +212,6 @@ SOFTWARE.
#define DeviceMode (1L << 0)
#define Relative 0
#define Absolute 1
/* Merged from Metrolink tree for XINPUT stuff */
#define TS_Raw 57
#define TS_Scaled 58
#define SendCoreEvents 59
#define DontSendCoreEvents 60
/* End of merged section */

#define ProximityState (1L << 1)
#define InProximity (0L << 1)
Expand Down Expand Up @@ -242,6 +246,14 @@ SOFTWARE.
#define _deviceOwnerGrabButton 8
#define _noExtensionEvent 9

#define _devicePresence 0

#define DeviceAdded 0
#define DeviceRemoved 1
#define DeviceEnabled 2
#define DeviceDisabled 3
#define DeviceUnrecoverable 4

#define XI_BadDevice 0
#define XI_BadEvent 1
#define XI_BadMode 2
Expand Down
111 changes: 99 additions & 12 deletions nx-X11/include/extensions/XIproto.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ SOFTWARE.

#define numInputClasses 7

#define IEVENTS 15
#define IEVENTS 16
#define IERRORS 5

#define CLIENT_REQ 1
Expand Down Expand Up @@ -111,6 +111,7 @@ struct tmask
#define XI_ChangeDeviceNotify 12
#define XI_DeviceKeystateNotify 13
#define XI_DeviceButtonstateNotify 14
#define XI_DevicePresenceNotify 15

/*********************************************************
*
Expand Down Expand Up @@ -1288,6 +1289,46 @@ typedef struct {
CARD32 num_valuators B32; /* number of valuators */
} xDeviceResolutionState;

typedef struct {
CARD16 control B16;
CARD16 length B16;
INT32 min_x B32;
INT32 max_x B32;
INT32 min_y B32;
INT32 max_y B32;
CARD32 flip_x B32;
CARD32 flip_y B32;
CARD32 rotation B32;
CARD32 button_threshold B32;
} xDeviceAbsCalibState;

typedef struct {
CARD16 control B16;
CARD16 length B16;
CARD32 offset_x B32;
CARD32 offset_y B32;
CARD32 width B32;
CARD32 height B32;
CARD32 screen B32;
CARD32 following B32;
} xDeviceAbsAreaState;

typedef struct {
CARD16 control B16; /* control type */
CARD16 length B16; /* control length */
CARD8 status;
CARD8 iscore;
CARD16 pad1 B16;
} xDeviceCoreState;

typedef struct {
CARD16 control B16; /* control type */
CARD16 length B16; /* control length */
CARD8 enable;
CARD8 pad0;
CARD16 pad1 B16;
} xDeviceEnableState;

/*********************************************************
*
* ChangeDeviceControl.
Expand Down Expand Up @@ -1330,21 +1371,45 @@ typedef struct {
CARD8 pad1,pad2;
} xDeviceResolutionCtl;


/* Merged from Metrolink tree for XINPUT stuff */

typedef struct {
CARD16 control;
CARD16 length;
CARD32 min_x;
CARD32 max_x;
CARD32 min_y;
CARD32 max_y;
CARD16 control B16;
CARD16 length B16;
INT32 min_x;
INT32 max_x;
INT32 min_y;
INT32 max_y;
CARD32 flip_x;
CARD32 flip_y;
CARD32 rotation;
CARD32 button_threshold;
} xDeviceTSCalibrationCtl;
} xDeviceAbsCalibCtl;

/* End of merged section */
typedef struct {
CARD16 control B16;
CARD16 length B16;
CARD32 offset_x;
CARD32 offset_y;
INT32 width;
INT32 height;
INT32 screen;
CARD32 following;
} xDeviceAbsAreaCtl;

typedef struct {
CARD16 control B16;
CARD16 length B16;
CARD8 status;
CARD8 pad0;
CARD16 pad1 B16;
} xDeviceCoreCtl;

typedef struct {
CARD16 control B16;
CARD16 length B16;
CARD8 enable;
CARD8 pad0;
CARD16 pad1 B16;
} xDeviceEnableCtl;

/**********************************************************
*
Expand Down Expand Up @@ -1521,6 +1586,28 @@ typedef struct
CARD32 pad04 B32;
} changeDeviceNotify;

/**********************************************************
*
* devicePresenceNotify.
*
*/

typedef struct
{
BYTE type;
BYTE pad00;
CARD16 sequenceNumber B16;
Time time B32;
BYTE devchange; /* Device{Added|Removed|Enabled|Disabled} */
BYTE deviceid;
CARD16 control B16;
CARD32 pad02 B32;
CARD32 pad03 B32;
CARD32 pad04 B32;
CARD32 pad05 B32;
CARD32 pad06 B32;
} devicePresenceNotify;

#undef Window
#undef Time
#undef KeyCode
Expand Down
13 changes: 11 additions & 2 deletions nx-X11/include/extensions/damageproto.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/*
* $Id: damageproto.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $
*
* Copyright © 2003 Keith Packard
* Copyright © 2007 Eric Anholt
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
Expand Down Expand Up @@ -115,6 +114,16 @@ typedef struct {

#define sz_xDamageSubtractReq 16

typedef struct {
CARD8 reqType;
CARD8 damageReqType;
CARD16 length B16;
Drawable drawable B32;
Region region B32;
} xDamageAddReq;

#define sz_xDamageAddReq 12

/* Events */

#define DamageNotifyMore 0x80
Expand Down
7 changes: 3 additions & 4 deletions nx-X11/include/extensions/damagewire.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
/*
* $Id: damagewire.h,v 1.2 2004/07/29 19:29:55 stukreit Exp $
*
* Copyright © 2003 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
Expand All @@ -27,7 +25,7 @@

#define DAMAGE_NAME "DAMAGE"
#define DAMAGE_MAJOR 1
#define DAMAGE_MINOR 0
#define DAMAGE_MINOR 1

/************* Version 1 ****************/

Expand All @@ -42,8 +40,9 @@
#define X_DamageCreate 1
#define X_DamageDestroy 2
#define X_DamageSubtract 3
#define X_DamageAdd 4

#define XDamageNumberRequests (X_DamageSubtract + 1)
#define XDamageNumberRequests (X_DamageAdd + 1)

/* Events */
#define XDamageNotify 0
Expand Down
3 changes: 3 additions & 0 deletions nx-X11/programs/Xserver/Imakefile
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXglyph.o \
hw/nxagent/NXpicture.o \
hw/nxagent/NXglxext.o \
hw/nxagent/NXmiglyph.o \
hw/nxagent/NXresource.o \
$(NULL)
#elif !defined(Win32Architecture)
Expand All @@ -258,6 +259,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXpicture.o \
hw/nxagent/NXglxext.o \
hw/nxagent/NXxvdisp.o \
hw/nxagent/NXmiglyph.o \
hw/nxagent/NXresource.o \
$(NULL)
#else
Expand All @@ -273,6 +275,7 @@ NXAGENTOBJS = hw/nxagent/miinitext.o \
hw/nxagent/NXpicture.o \
hw/nxagent/NXglxext.o \
hw/nxagent/NXxvdisp.o \
hw/nxagent/NXmiglyph.o \
hw/nxagent/NXresource.o \
dix/main.o \
$(NULL)
Expand Down
62 changes: 61 additions & 1 deletion nx-X11/programs/Xserver/Xext/security.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ in this Software without prior written authorization from The Open Group.
#include "colormapst.h"
#include "propertyst.h"
#include "protocol-versions.h"
#define _SECURITY_SERVER
#include "securitysrv.h"
#include <nx-X11/extensions/securstr.h>
#include <assert.h>
#include <stdarg.h>
Expand Down Expand Up @@ -114,6 +114,23 @@ static char _NXPolicyFilePath[1024];

static int SecurityErrorBase; /* first Security error number */
static int SecurityEventBase; /* first Security event number */
static int securityClientPrivateIndex;
static int securityExtnsnPrivateIndex;

/* this is what we store as client security state */
typedef struct {
unsigned int trustLevel;
XID authId;
} SecurityClientStateRec;

#define STATEVAL(extnsn) \
((extnsn)->devPrivates[securityExtnsnPrivateIndex].val)
#define STATEPTR(client) \
((client)->devPrivates[securityClientPrivateIndex].ptr)
#define TRUSTLEVEL(client) \
(((SecurityClientStateRec*)STATEPTR(client))->trustLevel)
#define AUTHID(client) \
(((SecurityClientStateRec*)STATEPTR(client))->authId)

CallbackListPtr SecurityValidateGroupCallback = NULL; /* see security.h */

Expand Down Expand Up @@ -2111,6 +2128,49 @@ XSecurityOptions(argc, argv, i)
} /* XSecurityOptions */


/* SecurityExtensionSetup
*
* Arguments: none.
*
* Returns: nothing.
*
* Side Effects:
* Sets up the Security extension if possible.
* This function contains things that need to be done
* before any other extension init functions get called.
*/

void
SecurityExtensionSetup()
{
/* Allocate the client private index */
securityClientPrivateIndex = AllocateClientPrivateIndex();
if (!AllocateClientPrivate(securityClientPrivateIndex,
sizeof (SecurityClientStateRec)))
FatalError("SecurityExtensionSetup: Can't allocate client private.\n");

/* Allocate the extension private index */
securityExtnsnPrivateIndex = AllocateExtensionPrivateIndex();
if (!AllocateExtensionPrivate(securityExtnsnPrivateIndex, 0))
FatalError("SecurityExtensionSetup: Can't allocate extnsn private.\n");

/* register callbacks */
/*
currently disabled because we are not using XACE yet.
#define XaceRC XaceRegisterCallback
XaceRC(XACE_RESOURCE_ACCESS, SecurityCheckResourceIDAccess, NULL);
XaceRC(XACE_DEVICE_ACCESS, SecurityCheckDeviceAccess, NULL);
XaceRC(XACE_PROPERTY_ACCESS, SecurityCheckPropertyAccess, NULL);
XaceRC(XACE_DRAWABLE_ACCESS, SecurityCheckDrawableAccess, NULL);
XaceRC(XACE_MAP_ACCESS, SecurityCheckMapAccess, NULL);
XaceRC(XACE_BACKGRND_ACCESS, SecurityCheckBackgrndAccess, NULL);
XaceRC(XACE_EXT_DISPATCH, SecurityCheckExtAccess, NULL);
XaceRC(XACE_EXT_ACCESS, SecurityCheckExtAccess, NULL);
XaceRC(XACE_HOSTLIST_ACCESS, SecurityCheckHostlistAccess, NULL);
XaceRC(XACE_DECLARE_EXT_SECURE, SecurityDeclareExtSecure, NULL);
*/
} /* SecurityExtensionSetup */


/* SecurityExtensionInit
*
Expand Down
Loading