Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156825 | Differences between
and this patch

Collapse All | Expand All

(-)xorg-server-X11R7.1-1.1.0/mi/miinitext.c.orig (+6 lines)
Lines 385-390 Link Here
385
#ifdef DMXEXT
385
#ifdef DMXEXT
386
extern void DMXExtensionInit(INITARGS);
386
extern void DMXExtensionInit(INITARGS);
387
#endif
387
#endif
388
#ifdef XCALIBRATE
389
extern void XCalibrateExtensionInit(INITARGS);
390
#endif
388
#ifdef XEVIE
391
#ifdef XEVIE
389
extern void XevieExtensionInit(INITARGS);
392
extern void XevieExtensionInit(INITARGS);
390
#endif
393
#endif
Lines 679-684 Link Here
679
#ifdef DAMAGE
682
#ifdef DAMAGE
680
    if (!noDamageExtension) DamageExtensionInit();
683
    if (!noDamageExtension) DamageExtensionInit();
681
#endif
684
#endif
685
#ifdef  XCALIBRATE
686
    XCalibrateExtensionInit ();
687
#endif
682
}
688
}
683
689
684
void
690
void
(-)xorg-server-X11R7.1-1.1.0/configure.ac.orig (-1 / +8 lines)
Lines 407-412 Link Here
407
AC_ARG_ENABLE(xf86vidmode,    AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
407
AC_ARG_ENABLE(xf86vidmode,    AS_HELP_STRING([--disable-xf86vidmode], [Build XF86VidMode extension (default: enabled)]), [XF86VIDMODE=$enableval], [XF86VIDMODE=yes])
408
AC_ARG_ENABLE(xf86misc,       AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
408
AC_ARG_ENABLE(xf86misc,       AS_HELP_STRING([--disable-xf86misc], [Build XF86Misc extension (default: enabled)]), [XF86MISC=$enableval], [XF86MISC=yes])
409
AC_ARG_ENABLE(xcsecurity,     AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes])
409
AC_ARG_ENABLE(xcsecurity,     AS_HELP_STRING([--disable-xcsecurity], [Build Security extension (default: enabled)]), [XCSECURITY=$enableval], [XCSECURITY=yes])
410
AC_ARG_ENABLE(xcalibrate,     AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no])
410
AC_ARG_ENABLE(xevie,          AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
411
AC_ARG_ENABLE(xevie,          AS_HELP_STRING([--disable-xevie], [Build XEvIE extension (default: enabled)]), [XEVIE=$enableval], [XEVIE=yes])
411
AC_ARG_ENABLE(lbx,            AS_HELP_STRING([--disable-lbx], [Build LBX extension (default: no)]), [LBX=$enableval], [LBX=no])
412
AC_ARG_ENABLE(lbx,            AS_HELP_STRING([--disable-lbx], [Build LBX extension (default: no)]), [LBX=$enableval], [LBX=no])
412
AC_ARG_ENABLE(appgroup,       AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes])
413
AC_ARG_ENABLE(appgroup,       AS_HELP_STRING([--disable-appgroup], [Build XC-APPGROUP extension (default: enabled)]), [APPGROUP=$enableval], [APPGROUP=yes])
Lines 641-646 Link Here
641
	AC_DEFINE(XCSECURITY, 1, [Build Security extension])
642
	AC_DEFINE(XCSECURITY, 1, [Build Security extension])
642
fi
643
fi
643
644
645
AM_CONDITIONAL(XCALIBRATE, [test "x$XCALIBRATE" = xyes])
646
if test "x$XCALIBRATE" = xyes; then
647
	AC_DEFINE(XCALIBRATE, 1, [Build XCalibrate extension])
648
	REQUIRED_MODULES="$REQUIRED_MODULES xcalibrateproto"
649
fi
650
644
AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes])
651
AM_CONDITIONAL(XEVIE, [test "x$XEVIE" = xyes])
645
if test "x$XEVIE" = xyes; then
652
if test "x$XEVIE" = xyes; then
646
	AC_DEFINE(XEVIE, 1, [Build XEvIE extension])
653
	AC_DEFINE(XEVIE, 1, [Build XEvIE extension])
Lines 1466-1472 Link Here
1466
    KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
1473
    KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
1467
    KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
1474
    KDRIVE_OS_LIB='$(top_builddir)/hw/kdrive/linux/liblinux.a'
1468
    KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
1475
    KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.a'
1469
    KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_OS_LIB $KDRIVE_PURE_LIBS $KDRIVE_STUB_LIB"
1476
    KDRIVE_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_PURE_LIBS $KDRIVE_OS_LIB $KDRIVE_STUB_LIB"
1470
1477
1471
    # check if we can build Xephyr
1478
    # check if we can build Xephyr
1472
    PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
1479
    PKG_CHECK_MODULES(XEPHYR, x11 xext xfont xau xdmcp, [xephyr="yes"], [xephyr="no"])
(-)xorg-server-X11R7.1-1.1.0/include/kdrive-config.h.in.orig (+3 lines)
Lines 22-25 Link Here
22
/* Support tslib touchscreen abstraction library */
22
/* Support tslib touchscreen abstraction library */
23
#undef TSLIB
23
#undef TSLIB
24
24
25
/* Enable XCalibrate extension */
26
#undef XCALIBRATE
27
25
#endif /* _KDRIVE_CONFIG_H_ */
28
#endif /* _KDRIVE_CONFIG_H_ */
(-)xorg-server-X11R7.1-1.1.0/Xext/Makefile.am.orig (+6 lines)
Lines 78-83 Link Here
78
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
78
AM_CFLAGS += -DDEFAULTPOLICYFILE=\"$(SERVERCONFIGdir)/SecurityPolicy\"
79
endif
79
endif
80
80
81
XCALIBRATE_SRCS = xcalibrate.c
82
if XCALIBRATE
83
BUILTIN_SRCS += $(XCALIBRATE_SRCS)
84
endif
85
81
# X EVent Interception Extension: allows accessibility helpers & composite
86
# X EVent Interception Extension: allows accessibility helpers & composite
82
# managers to intercept events from input devices and transform as needed
87
# managers to intercept events from input devices and transform as needed
83
# before the clients see them.
88
# before the clients see them.
Lines 155-160 Link Here
155
	$(SCREENSAVER_SRCS) \
160
	$(SCREENSAVER_SRCS) \
156
	$(XCSECURITY_SRCS) \
161
	$(XCSECURITY_SRCS) \
157
	$(XINERAMA_SRCS) \
162
	$(XINERAMA_SRCS) \
163
	$(XCALIBRATE_SRCS) \
158
	$(XEVIE_SRCS) \
164
	$(XEVIE_SRCS) \
159
	$(XPRINT_SRCS) \
165
	$(XPRINT_SRCS) \
160
	$(APPGROUP_SRCS) \
166
	$(APPGROUP_SRCS) \
(-)xorg-server-X11R7.1-1.1.0/Xext/xcalibrate.c.orig (+262 lines)
Line 0 Link Here
1
/*
2
 * $Id: xcalibrate.c,v 3.1 2004/06/02 20:49:50 pb Exp $
3
 *
4
 * Copyright © 2003 Philip Blundell
5
 *
6
 * Permission to use, copy, modify, distribute, and sell this software and its
7
 * documentation for any purpose is hereby granted without fee, provided that
8
 * the above copyright notice appear in all copies and that both that
9
 * copyright notice and this permission notice appear in supporting
10
 * documentation, and that the name of Philip Blundell not be used in
11
 * advertising or publicity pertaining to distribution of the software without
12
 * specific, written prior permission.  Philip Blundell makes no
13
 * representations about the suitability of this software for any purpose.  It
14
 * is provided "as is" without express or implied warranty.
15
 *
16
 * PHILIP BLUNDELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
17
 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
18
 * EVENT SHALL PHILIP BLUNDELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR
19
 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
20
 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
21
 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
22
 * PERFORMANCE OF THIS SOFTWARE.
23
 */
24
25
#ifdef HAVE_KDRIVE_CONFIG_H
26
#include <kdrive-config.h>
27
#endif
28
29
#define NEED_EVENTS
30
#define NEED_REPLIES
31
32
#include <X11/X.h>
33
#include <X11/Xproto.h>
34
#include "misc.h"
35
#include "os.h"
36
#include "dixstruct.h"
37
#include "extnsionst.h"
38
#include "swaprep.h"
39
40
#include <X11/extensions/xcalibrateproto.h>
41
#include <X11/extensions/xcalibratewire.h>
42
43
extern void (*tslib_raw_event_hook)(int x, int y, int pressure, void *closure);
44
extern void *tslib_raw_event_closure;
45
46
static CARD8	XCalibrateReqCode;
47
int		XCalibrateEventBase;
48
int		XCalibrateReqBase;
49
int		XCalibrateErrorBase;
50
51
static ClientPtr xcalibrate_client;
52
53
static void
54
xcalibrate_event_hook (int x, int y, int pressure, void *closure)
55
{
56
  ClientPtr pClient = (ClientPtr) closure;
57
  xXCalibrateRawTouchscreenEvent	ev;
58
59
  ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen;
60
  ev.sequenceNumber = pClient->sequence;
61
  ev.x = x;
62
  ev.y = y;
63
  ev.pressure = pressure;
64
65
  if (!pClient->clientGone)
66
    WriteEventsToClient (pClient, 1, (xEvent *) &ev);
67
}
68
69
static int
70
ProcXCalibrateQueryVersion (ClientPtr client)
71
{
72
  REQUEST(xXCalibrateQueryVersionReq);
73
  xXCalibrateQueryVersionReply rep;
74
  CARD16 client_major, client_minor;  /* not used */
75
76
  REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
77
78
  client_major = stuff->majorVersion;
79
  client_minor = stuff->minorVersion;
80
81
  fprintf(stderr, "%s(): called\n", __func__); 
82
83
  rep.type = X_Reply;
84
  rep.length = 0;
85
  rep.sequenceNumber = client->sequence;
86
  rep.majorVersion = XCALIBRATE_MAJOR_VERSION;
87
  rep.minorVersion = XCALIBRATE_MINOR_VERSION;   
88
  if (client->swapped) { 
89
    int n;
90
    swaps(&rep.sequenceNumber, n);
91
    swapl(&rep.length, n);     
92
    swaps(&rep.majorVersion, n);
93
    swaps(&rep.minorVersion, n);
94
  }
95
  WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep);
96
  return (client->noClientException);
97
}
98
99
static int
100
SProcXCalibrateQueryVersion (ClientPtr client)
101
{
102
    REQUEST(xXCalibrateQueryVersionReq);
103
    int n;
104
105
    REQUEST_SIZE_MATCH (xXCalibrateQueryVersionReq);
106
    swaps(&stuff->majorVersion,n);
107
    swaps(&stuff->minorVersion,n);
108
    return ProcXCalibrateQueryVersion(client);
109
}
110
111
static int
112
ProcXCalibrateSetRawMode (ClientPtr client)
113
{
114
  REQUEST(xXCalibrateRawModeReq);
115
  xXCalibrateRawModeReply rep;
116
117
  REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
118
119
  memset (&rep, 0, sizeof (rep));
120
  rep.type = X_Reply;
121
  rep.sequenceNumber = client->sequence;
122
123
  if (stuff->on)
124
    {
125
      if (xcalibrate_client == NULL)
126
	{
127
	  /* Start calibrating.  */
128
	  xcalibrate_client = client;
129
	  tslib_raw_event_hook = xcalibrate_event_hook;
130
	  tslib_raw_event_closure = client;
131
	  rep.status = GrabSuccess;
132
	}
133
      else
134
	{
135
	  rep.status = AlreadyGrabbed;
136
	}
137
    }
138
  else
139
    {
140
      if (xcalibrate_client == client)
141
	{
142
	  /* Stop calibrating.  */
143
	  xcalibrate_client = NULL;
144
	  tslib_raw_event_hook = NULL;
145
	  tslib_raw_event_closure = NULL;
146
	  rep.status = GrabSuccess;
147
148
	  /* Cycle input off and on to reload configuration.  */
149
	  KdDisableInput ();
150
	  KdEnableInput ();
151
	}
152
      else
153
	{
154
	  rep.status = AlreadyGrabbed;
155
	}
156
    }
157
158
  if (client->swapped)
159
    {
160
      int n;
161
162
      swaps (&rep.sequenceNumber, n);
163
      swaps (&rep.status, n);
164
    }
165
  WriteToClient(client, sizeof (rep), (char *) &rep);
166
  return (client->noClientException);
167
}
168
169
170
static int
171
SProcXCalibrateSetRawMode (ClientPtr client)
172
{
173
  REQUEST(xXCalibrateRawModeReq);
174
  int n;
175
176
  REQUEST_SIZE_MATCH (xXCalibrateRawModeReq);
177
178
  swaps(&stuff->on, n);
179
180
  return ProcXCalibrateSetRawMode(client);
181
}
182
183
static void
184
XCalibrateResetProc (ExtensionEntry *extEntry) 
185
{ 
186
}
187
188
static int
189
ProcXCalibrateDispatch (ClientPtr client)
190
{
191
    REQUEST(xReq);
192
    switch (stuff->data) {
193
    case X_XCalibrateQueryVersion:
194
        return ProcXCalibrateQueryVersion(client);
195
    case X_XCalibrateRawMode:
196
        return ProcXCalibrateSetRawMode(client);
197
    default: break;
198
    }
199
200
    return BadRequest;
201
}
202
203
static int
204
SProcXCalibrateDispatch (ClientPtr client)
205
{
206
    REQUEST(xReq);
207
    int n;
208
209
    swaps(&stuff->length,n);
210
211
    switch (stuff->data) {
212
    case X_XCalibrateQueryVersion:
213
        return SProcXCalibrateQueryVersion(client);
214
    case X_XCalibrateRawMode:
215
        return SProcXCalibrateSetRawMode(client);
216
217
    default: break;
218
    }
219
220
    return BadRequest;
221
}
222
223
static void
224
XCalibrateClientCallback (CallbackListPtr	*list,
225
			  pointer		closure,
226
			  pointer		data)
227
{
228
    NewClientInfoRec	*clientinfo = (NewClientInfoRec *) data;
229
    ClientPtr		pClient = clientinfo->client;
230
231
    if (clientinfo->setup == NULL
232
	&& xcalibrate_client != NULL
233
	&& xcalibrate_client == pClient)
234
      {
235
	/* Stop calibrating.  */
236
	xcalibrate_client = NULL;
237
	tslib_raw_event_hook = NULL;
238
	tslib_raw_event_closure = NULL;
239
      }
240
}
241
242
void
243
XCalibrateExtensionInit(void)
244
{
245
  ExtensionEntry *extEntry;
246
247
  if (!AddCallback (&ClientStateCallback, XCalibrateClientCallback, 0))
248
    return;  
249
250
  extEntry = AddExtension(XCALIBRATE_NAME, XCalibrateNumberEvents, XCalibrateNumberErrors,
251
			  ProcXCalibrateDispatch, SProcXCalibrateDispatch,
252
			  XCalibrateResetProc, StandardMinorOpcode);
253
254
  if (!extEntry)
255
    return;
256
257
  XCalibrateReqCode = (unsigned char)extEntry->base;
258
  XCalibrateEventBase = extEntry->eventBase;
259
  XCalibrateErrorBase = extEntry->errorBase;
260
261
  xcalibrate_client = 0;
262
}

Return to bug 156825