Merge remote-tracking branch 'whot/next'
This commit is contained in:
commit
116f020102
|
@ -596,7 +596,7 @@ Bool
|
||||||
PanoramiXCreateConnectionBlock(void)
|
PanoramiXCreateConnectionBlock(void)
|
||||||
{
|
{
|
||||||
int i, j, length;
|
int i, j, length;
|
||||||
Bool disableBackingStore = FALSE;
|
Bool disable_backing_store = FALSE;
|
||||||
int old_width, old_height;
|
int old_width, old_height;
|
||||||
float width_mult, height_mult;
|
float width_mult, height_mult;
|
||||||
xWindowRoot *root;
|
xWindowRoot *root;
|
||||||
|
@ -622,10 +622,10 @@ PanoramiXCreateConnectionBlock(void)
|
||||||
}
|
}
|
||||||
if (pScreen->backingStoreSupport !=
|
if (pScreen->backingStoreSupport !=
|
||||||
screenInfo.screens[0]->backingStoreSupport)
|
screenInfo.screens[0]->backingStoreSupport)
|
||||||
disableBackingStore = TRUE;
|
disable_backing_store = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disableBackingStore) {
|
if (disable_backing_store) {
|
||||||
for (i = 0; i < screenInfo.numScreens; i++) {
|
for (i = 0; i < screenInfo.numScreens; i++) {
|
||||||
pScreen = screenInfo.screens[i];
|
pScreen = screenInfo.screens[i];
|
||||||
pScreen->backingStoreSupport = NotUseful;
|
pScreen->backingStoreSupport = NotUseful;
|
||||||
|
@ -831,15 +831,15 @@ PanoramiXConsolidate(void)
|
||||||
saver->type = XRT_WINDOW;
|
saver->type = XRT_WINDOW;
|
||||||
|
|
||||||
FOR_NSCREENS(i) {
|
FOR_NSCREENS(i) {
|
||||||
ScreenPtr pScreen = screenInfo.screens[i];
|
ScreenPtr scr = screenInfo.screens[i];
|
||||||
|
|
||||||
root->info[i].id = pScreen->root->drawable.id;
|
root->info[i].id = scr->root->drawable.id;
|
||||||
root->u.win.class = InputOutput;
|
root->u.win.class = InputOutput;
|
||||||
root->u.win.root = TRUE;
|
root->u.win.root = TRUE;
|
||||||
saver->info[i].id = pScreen->screensaver.wid;
|
saver->info[i].id = scr->screensaver.wid;
|
||||||
saver->u.win.class = InputOutput;
|
saver->u.win.class = InputOutput;
|
||||||
saver->u.win.root = TRUE;
|
saver->u.win.root = TRUE;
|
||||||
defmap->info[i].id = pScreen->defColormap;
|
defmap->info[i].id = scr->defColormap;
|
||||||
}
|
}
|
||||||
|
|
||||||
AddResource(root->info[0].id, XRT_WINDOW, root);
|
AddResource(root->info[0].id, XRT_WINDOW, root);
|
||||||
|
|
13
Xext/sync.c
13
Xext/sync.c
|
@ -2747,7 +2747,6 @@ init_system_idle_counter(const char *name, int deviceid)
|
||||||
{
|
{
|
||||||
CARD64 resolution;
|
CARD64 resolution;
|
||||||
XSyncValue idle;
|
XSyncValue idle;
|
||||||
IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
|
|
||||||
SyncCounter *idle_time_counter;
|
SyncCounter *idle_time_counter;
|
||||||
|
|
||||||
IdleTimeQueryValue(NULL, &idle);
|
IdleTimeQueryValue(NULL, &idle);
|
||||||
|
@ -2758,10 +2757,14 @@ init_system_idle_counter(const char *name, int deviceid)
|
||||||
IdleTimeQueryValue,
|
IdleTimeQueryValue,
|
||||||
IdleTimeBracketValues);
|
IdleTimeBracketValues);
|
||||||
|
|
||||||
priv->deviceid = deviceid;
|
if (idle_time_counter != NULL) {
|
||||||
priv->value_less = priv->value_greater = NULL;
|
IdleCounterPriv *priv = malloc(sizeof(IdleCounterPriv));
|
||||||
|
|
||||||
idle_time_counter->pSysCounterInfo->private = priv;
|
priv->value_less = priv->value_greater = NULL;
|
||||||
|
priv->deviceid = deviceid;
|
||||||
|
|
||||||
|
idle_time_counter->pSysCounterInfo->private = priv;
|
||||||
|
}
|
||||||
|
|
||||||
return idle_time_counter;
|
return idle_time_counter;
|
||||||
}
|
}
|
||||||
|
@ -2786,6 +2789,6 @@ void SyncRemoveDeviceIdleTime(SyncCounter *counter)
|
||||||
/* FreeAllResources() frees all system counters before the devices are
|
/* FreeAllResources() frees all system counters before the devices are
|
||||||
shut down, check if there are any left before freeing the device's
|
shut down, check if there are any left before freeing the device's
|
||||||
counter */
|
counter */
|
||||||
if (!xorg_list_is_empty(&SysCounterList))
|
if (counter && !xorg_list_is_empty(&SysCounterList))
|
||||||
xorg_list_del(&counter->pSysCounterInfo->entry);
|
xorg_list_del(&counter->pSysCounterInfo->entry);
|
||||||
}
|
}
|
||||||
|
|
|
@ -702,7 +702,7 @@ ProcXvUngrabPort(ClientPtr client)
|
||||||
static int
|
static int
|
||||||
ProcXvStopVideo(ClientPtr client)
|
ProcXvStopVideo(ClientPtr client)
|
||||||
{
|
{
|
||||||
int status, rc;
|
int status, ret;
|
||||||
DrawablePtr pDraw;
|
DrawablePtr pDraw;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
|
|
||||||
|
@ -716,9 +716,9 @@ ProcXvStopVideo(ClientPtr client)
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
|
ret = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess);
|
||||||
if (rc != Success)
|
if (ret != Success)
|
||||||
return rc;
|
return ret;
|
||||||
|
|
||||||
return XvdiStopVideo(client, pPort, pDraw);
|
return XvdiStopVideo(client, pPort, pDraw);
|
||||||
}
|
}
|
||||||
|
|
|
@ -803,6 +803,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
|
||||||
RT_WINDOW, client, DixGetAttrAccess);
|
RT_WINDOW, client, DixGetAttrAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success) {
|
||||||
client->errorValue = stuff->window;
|
client->errorValue = stuff->window;
|
||||||
|
free(overlayWin);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
pScreen = pWin->drawable.pScreen;
|
pScreen = pWin->drawable.pScreen;
|
||||||
|
@ -812,8 +813,10 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
|
||||||
* interest in the overlay window
|
* interest in the overlay window
|
||||||
*/
|
*/
|
||||||
pOc = compCreateOverlayClient(pScreen, client);
|
pOc = compCreateOverlayClient(pScreen, client);
|
||||||
if (pOc == NULL)
|
if (pOc == NULL) {
|
||||||
|
free(overlayWin);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure the overlay window exists
|
* Make sure the overlay window exists
|
||||||
|
@ -822,6 +825,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
|
||||||
if (cs->pOverlayWin == NULL)
|
if (cs->pOverlayWin == NULL)
|
||||||
if (!compCreateOverlayWindow(pScreen)) {
|
if (!compCreateOverlayWindow(pScreen)) {
|
||||||
FreeResource(pOc->resource, RT_NONE);
|
FreeResource(pOc->resource, RT_NONE);
|
||||||
|
free(overlayWin);
|
||||||
return BadAlloc;
|
return BadAlloc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -831,6 +835,7 @@ PanoramiXCompositeGetOverlayWindow(ClientPtr client)
|
||||||
DixGetAttrAccess);
|
DixGetAttrAccess);
|
||||||
if (rc != Success) {
|
if (rc != Success) {
|
||||||
FreeResource(pOc->resource, RT_NONE);
|
FreeResource(pOc->resource, RT_NONE);
|
||||||
|
free(overlayWin);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -308,6 +308,13 @@ AC_CHECK_HEADER([execinfo.h],[
|
||||||
])]
|
])]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
PKG_CHECK_MODULES(LIBUNWIND, libunwind, [HAVE_LIBUNWIND=yes], [HAVE_LIBUNWIND=no])
|
||||||
|
if test "x$HAVE_LIBUNWIND" = xyes; then
|
||||||
|
AC_DEFINE(HAVE_LIBUNWIND, 1, [Have libunwind support])
|
||||||
|
fi
|
||||||
|
AM_CONDITIONAL(HAVE_LIBUNWIND, [test "x$HAVE_LIBUNWIND" = xyes])
|
||||||
|
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
dnl Bus options and CPU capabilities. Replaces logic in
|
dnl Bus options and CPU capabilities. Replaces logic in
|
||||||
dnl hw/xfree86/os-support/bus/Makefile.am, among others.
|
dnl hw/xfree86/os-support/bus/Makefile.am, among others.
|
||||||
|
@ -1336,7 +1343,7 @@ AC_DEFINE(BIGREQS, 1, [Support BigRequests extension])
|
||||||
|
|
||||||
if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
|
if test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" ; then
|
||||||
DIX_LIB='$(top_builddir)/dix/dix.O'
|
DIX_LIB='$(top_builddir)/dix/dix.O'
|
||||||
OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS)'
|
OS_LIB='$(top_builddir)/os/os.O $(SHA1_LIBS) $(DLOPEN_LIBS) $(LIBUNWIND_LIBS)'
|
||||||
else
|
else
|
||||||
DIX_LIB='$(top_builddir)/dix/libdix.la'
|
DIX_LIB='$(top_builddir)/dix/libdix.la'
|
||||||
OS_LIB='$(top_builddir)/os/libos.la'
|
OS_LIB='$(top_builddir)/os/libos.la'
|
||||||
|
|
|
@ -357,6 +357,8 @@ main(int argc, char *argv[], char *envp[])
|
||||||
|
|
||||||
FreeFonts();
|
FreeFonts();
|
||||||
|
|
||||||
|
FreeAllAtoms();
|
||||||
|
|
||||||
FreeAuditTimer();
|
FreeAuditTimer();
|
||||||
|
|
||||||
if (dispatchException & DE_TERMINATE) {
|
if (dispatchException & DE_TERMINATE) {
|
||||||
|
|
|
@ -1431,6 +1431,8 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CursorVisible = TRUE;
|
||||||
|
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowHasNewCursor(pWin);
|
WindowHasNewCursor(pWin);
|
||||||
|
|
||||||
|
@ -3430,6 +3432,8 @@ ChangeWindowDeviceCursor(WindowPtr pWin, DeviceIntPtr pDev, CursorPtr pCursor)
|
||||||
}
|
}
|
||||||
|
|
||||||
out:
|
out:
|
||||||
|
CursorVisible = TRUE;
|
||||||
|
|
||||||
if (pWin->realized)
|
if (pWin->realized)
|
||||||
WindowHasNewCursor(pWin);
|
WindowHasNewCursor(pWin);
|
||||||
|
|
||||||
|
|
|
@ -185,19 +185,15 @@ fbGlyphs(CARD8 op,
|
||||||
if (maskFormat) {
|
if (maskFormat) {
|
||||||
pixman_format_code_t format;
|
pixman_format_code_t format;
|
||||||
pixman_box32_t extents;
|
pixman_box32_t extents;
|
||||||
int x, y;
|
|
||||||
|
|
||||||
format = maskFormat->format | (maskFormat->depth << 24);
|
format = maskFormat->format | (maskFormat->depth << 24);
|
||||||
|
|
||||||
pixman_glyph_get_extents(glyphCache, n_glyphs, pglyphs, &extents);
|
pixman_glyph_get_extents(glyphCache, n_glyphs, pglyphs, &extents);
|
||||||
|
|
||||||
x = extents.x1;
|
|
||||||
y = extents.y1;
|
|
||||||
|
|
||||||
pixman_composite_glyphs(op, srcImage, dstImage, format,
|
pixman_composite_glyphs(op, srcImage, dstImage, format,
|
||||||
xSrc + srcXoff + xDst, ySrc + srcYoff + yDst,
|
xSrc + srcXoff + xDst, ySrc + srcYoff + yDst,
|
||||||
x, y,
|
extents.x1, extents.y1,
|
||||||
x + dstXoff, y + dstYoff,
|
extents.x1 + dstXoff, extents.y1 + dstYoff,
|
||||||
extents.x2 - extents.x1,
|
extents.x2 - extents.x1,
|
||||||
extents.y2 - extents.y1,
|
extents.y2 - extents.y1,
|
||||||
glyphCache, n_glyphs, pglyphs);
|
glyphCache, n_glyphs, pglyphs);
|
||||||
|
|
|
@ -56,6 +56,7 @@ typedef struct _EphyrInputPrivate {
|
||||||
} EphyrKbdPrivate, EphyrPointerPrivate;
|
} EphyrKbdPrivate, EphyrPointerPrivate;
|
||||||
|
|
||||||
Bool EphyrWantGrayScale = 0;
|
Bool EphyrWantGrayScale = 0;
|
||||||
|
Bool EphyrWantResize = 0;
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
ephyrInitialize(KdCardInfo * card, EphyrPriv * priv)
|
ephyrInitialize(KdCardInfo * card, EphyrPriv * priv)
|
||||||
|
@ -237,13 +238,11 @@ ephyrMapFramebuffer(KdScreenInfo * screen)
|
||||||
KdComputePointerMatrix(&m, ephyrRandr, screen->width, screen->height);
|
KdComputePointerMatrix(&m, ephyrRandr, screen->width, screen->height);
|
||||||
KdSetPointerMatrix(&m);
|
KdSetPointerMatrix(&m);
|
||||||
|
|
||||||
priv->bytes_per_line =
|
|
||||||
((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2;
|
|
||||||
|
|
||||||
buffer_height = ephyrBufferHeight(screen);
|
buffer_height = ephyrBufferHeight(screen);
|
||||||
|
|
||||||
priv->base =
|
priv->base =
|
||||||
hostx_screen_init(screen, screen->width, screen->height, buffer_height);
|
hostx_screen_init(screen, screen->width, screen->height, buffer_height,
|
||||||
|
&priv->bytes_per_line, &screen->fb.bitsPerPixel);
|
||||||
|
|
||||||
if ((scrpriv->randr & RR_Rotate_0) && !(scrpriv->randr & RR_Reflect_All)) {
|
if ((scrpriv->randr & RR_Rotate_0) && !(scrpriv->randr & RR_Reflect_All)) {
|
||||||
scrpriv->shadow = FALSE;
|
scrpriv->shadow = FALSE;
|
||||||
|
|
|
@ -31,6 +31,7 @@
|
||||||
|
|
||||||
extern Window EphyrPreExistingHostWin;
|
extern Window EphyrPreExistingHostWin;
|
||||||
extern Bool EphyrWantGrayScale;
|
extern Bool EphyrWantGrayScale;
|
||||||
|
extern Bool EphyrWantResize;
|
||||||
extern Bool kdHasPointer;
|
extern Bool kdHasPointer;
|
||||||
extern Bool kdHasKbd;
|
extern Bool kdHasKbd;
|
||||||
|
|
||||||
|
@ -116,6 +117,7 @@ ddxUseMsg(void)
|
||||||
ErrorF("-host-cursor Re-use exisiting X host server cursor\n");
|
ErrorF("-host-cursor Re-use exisiting X host server cursor\n");
|
||||||
ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
|
ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n");
|
||||||
ErrorF("-grayscale Simulate 8bit grayscale\n");
|
ErrorF("-grayscale Simulate 8bit grayscale\n");
|
||||||
|
ErrorF("-resizeable Make Xephyr windows resizeable\n");
|
||||||
ErrorF
|
ErrorF
|
||||||
("-fakexa Simulate acceleration using software rendering\n");
|
("-fakexa Simulate acceleration using software rendering\n");
|
||||||
ErrorF("-verbosity <level> Set log verbosity level\n");
|
ErrorF("-verbosity <level> Set log verbosity level\n");
|
||||||
|
@ -210,6 +212,10 @@ ddxProcessArgument(int argc, char **argv, int i)
|
||||||
EphyrWantGrayScale = 1;
|
EphyrWantGrayScale = 1;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(argv[i], "-resizeable")) {
|
||||||
|
EphyrWantResize = 1;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
else if (!strcmp(argv[i], "-fakexa")) {
|
else if (!strcmp(argv[i], "-fakexa")) {
|
||||||
ephyrFuncs.initAccel = ephyrDrawInit;
|
ephyrFuncs.initAccel = ephyrDrawInit;
|
||||||
ephyrFuncs.enableAccel = ephyrDrawEnable;
|
ephyrFuncs.enableAccel = ephyrDrawEnable;
|
||||||
|
|
|
@ -1006,7 +1006,6 @@ ephyrPutVideo(KdScreenInfo * a_info,
|
||||||
EphyrPortPriv *port_priv = a_port_priv;
|
EphyrPortPriv *port_priv = a_port_priv;
|
||||||
BoxRec clipped_area, dst_box;
|
BoxRec clipped_area, dst_box;
|
||||||
int result = BadImplementation;
|
int result = BadImplementation;
|
||||||
int drw_x = 0, drw_y = 0, drw_w = 0, drw_h = 0;
|
|
||||||
|
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_info->pScreen, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_info->pScreen, BadValue);
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
||||||
|
@ -1024,11 +1023,6 @@ ephyrPutVideo(KdScreenInfo * a_info,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
drw_x = clipped_area.x1;
|
|
||||||
drw_y = clipped_area.y1;
|
|
||||||
drw_w = clipped_area.x2 - clipped_area.x1;
|
|
||||||
drw_h = clipped_area.y2 - clipped_area.y1;
|
|
||||||
|
|
||||||
if (!ephyrHostXVPutVideo(a_info->pScreen->myNum,
|
if (!ephyrHostXVPutVideo(a_info->pScreen->myNum,
|
||||||
port_priv->port_number,
|
port_priv->port_number,
|
||||||
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
||||||
|
@ -1055,7 +1049,6 @@ ephyrGetVideo(KdScreenInfo * a_info,
|
||||||
EphyrPortPriv *port_priv = a_port_priv;
|
EphyrPortPriv *port_priv = a_port_priv;
|
||||||
BoxRec clipped_area, dst_box;
|
BoxRec clipped_area, dst_box;
|
||||||
int result = BadImplementation;
|
int result = BadImplementation;
|
||||||
int drw_x = 0, drw_y = 0, drw_w = 0, drw_h = 0;
|
|
||||||
|
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue);
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
||||||
|
@ -1073,11 +1066,6 @@ ephyrGetVideo(KdScreenInfo * a_info,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
drw_x = clipped_area.x1;
|
|
||||||
drw_y = clipped_area.y1;
|
|
||||||
drw_w = clipped_area.x2 - clipped_area.x1;
|
|
||||||
drw_h = clipped_area.y2 - clipped_area.y1;
|
|
||||||
|
|
||||||
if (!ephyrHostXVGetVideo(a_info->pScreen->myNum,
|
if (!ephyrHostXVGetVideo(a_info->pScreen->myNum,
|
||||||
port_priv->port_number,
|
port_priv->port_number,
|
||||||
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
||||||
|
@ -1104,7 +1092,6 @@ ephyrPutStill(KdScreenInfo * a_info,
|
||||||
EphyrPortPriv *port_priv = a_port_priv;
|
EphyrPortPriv *port_priv = a_port_priv;
|
||||||
BoxRec clipped_area, dst_box;
|
BoxRec clipped_area, dst_box;
|
||||||
int result = BadImplementation;
|
int result = BadImplementation;
|
||||||
int drw_x = 0, drw_y = 0, drw_w = 0, drw_h = 0;
|
|
||||||
|
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue);
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
||||||
|
@ -1122,11 +1109,6 @@ ephyrPutStill(KdScreenInfo * a_info,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
drw_x = clipped_area.x1;
|
|
||||||
drw_y = clipped_area.y1;
|
|
||||||
drw_w = clipped_area.x2 - clipped_area.x1;
|
|
||||||
drw_h = clipped_area.y2 - clipped_area.y1;
|
|
||||||
|
|
||||||
if (!ephyrHostXVPutStill(a_info->pScreen->myNum,
|
if (!ephyrHostXVPutStill(a_info->pScreen->myNum,
|
||||||
port_priv->port_number,
|
port_priv->port_number,
|
||||||
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
||||||
|
@ -1153,7 +1135,6 @@ ephyrGetStill(KdScreenInfo * a_info,
|
||||||
EphyrPortPriv *port_priv = a_port_priv;
|
EphyrPortPriv *port_priv = a_port_priv;
|
||||||
BoxRec clipped_area, dst_box;
|
BoxRec clipped_area, dst_box;
|
||||||
int result = BadImplementation;
|
int result = BadImplementation;
|
||||||
int drw_x = 0, drw_y = 0, drw_w = 0, drw_h = 0;
|
|
||||||
|
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_info && a_info->pScreen, BadValue);
|
||||||
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
EPHYR_RETURN_VAL_IF_FAIL(a_drawable && port_priv, BadValue);
|
||||||
|
@ -1171,11 +1152,6 @@ ephyrGetStill(KdScreenInfo * a_info,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
drw_x = clipped_area.x1;
|
|
||||||
drw_y = clipped_area.y1;
|
|
||||||
drw_w = clipped_area.x2 - clipped_area.x1;
|
|
||||||
drw_h = clipped_area.y2 - clipped_area.y1;
|
|
||||||
|
|
||||||
if (!ephyrHostXVGetStill(a_info->pScreen->myNum,
|
if (!ephyrHostXVGetStill(a_info->pScreen->myNum,
|
||||||
port_priv->port_number,
|
port_priv->port_number,
|
||||||
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
a_vid_x, a_vid_y, a_vid_w, a_vid_h,
|
||||||
|
|
|
@ -117,6 +117,8 @@ extern EphyrKeySyms ephyrKeySyms;
|
||||||
|
|
||||||
extern int monitorResolution;
|
extern int monitorResolution;
|
||||||
|
|
||||||
|
extern Bool EphyrWantResize;
|
||||||
|
|
||||||
char *ephyrResName = NULL;
|
char *ephyrResName = NULL;
|
||||||
int ephyrResNameFromCmd = 0;
|
int ephyrResNameFromCmd = 0;
|
||||||
char *ephyrTitle = NULL;
|
char *ephyrTitle = NULL;
|
||||||
|
@ -617,7 +619,8 @@ hostx_set_cmap_entry(unsigned char idx,
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
hostx_screen_init(EphyrScreenInfo screen,
|
hostx_screen_init(EphyrScreenInfo screen,
|
||||||
int width, int height, int buffer_height)
|
int width, int height, int buffer_height,
|
||||||
|
int *bytes_per_line, int *bits_per_pixel)
|
||||||
{
|
{
|
||||||
int bitmap_pad;
|
int bitmap_pad;
|
||||||
Bool shm_success = False;
|
Bool shm_success = False;
|
||||||
|
@ -694,10 +697,13 @@ hostx_screen_init(EphyrScreenInfo screen,
|
||||||
malloc(host_screen->ximg->bytes_per_line * buffer_height);
|
malloc(host_screen->ximg->bytes_per_line * buffer_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*bytes_per_line = host_screen->ximg->bytes_per_line;
|
||||||
|
*bits_per_pixel = host_screen->ximg->bits_per_pixel;
|
||||||
|
|
||||||
XResizeWindow(HostX.dpy, host_screen->win, width, height);
|
XResizeWindow(HostX.dpy, host_screen->win, width, height);
|
||||||
|
|
||||||
/* Ask the WM to keep our size static */
|
/* Ask the WM to keep our size static */
|
||||||
if (host_screen->win_pre_existing == None) {
|
if (host_screen->win_pre_existing == None && !EphyrWantResize) {
|
||||||
size_hints = XAllocSizeHints();
|
size_hints = XAllocSizeHints();
|
||||||
size_hints->max_width = size_hints->min_width = width;
|
size_hints->max_width = size_hints->min_width = width;
|
||||||
size_hints->max_height = size_hints->min_height = height;
|
size_hints->max_height = size_hints->min_height = height;
|
||||||
|
@ -858,7 +864,7 @@ hostx_load_keymap(void)
|
||||||
(max_keycode - min_keycode + 1) *
|
(max_keycode - min_keycode + 1) *
|
||||||
width);
|
width);
|
||||||
if (!ephyrKeySyms.map)
|
if (!ephyrKeySyms.map)
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
for (i = 0; i < (max_keycode - min_keycode + 1); i++)
|
for (i = 0; i < (max_keycode - min_keycode + 1); i++)
|
||||||
for (j = 0; j < width; j++)
|
for (j = 0; j < width; j++)
|
||||||
|
@ -871,6 +877,7 @@ hostx_load_keymap(void)
|
||||||
ephyrKeySyms.maxKeyCode = max_keycode;
|
ephyrKeySyms.maxKeyCode = max_keycode;
|
||||||
ephyrKeySyms.mapWidth = width;
|
ephyrKeySyms.mapWidth = width;
|
||||||
|
|
||||||
|
out:
|
||||||
XFree(keymap);
|
XFree(keymap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1011,19 +1018,27 @@ hostx_get_event(EphyrHostXEvent * ev)
|
||||||
|
|
||||||
case ConfigureNotify:
|
case ConfigureNotify:
|
||||||
{
|
{
|
||||||
struct EphyrHostScreen *host_screen =
|
struct EphyrHostScreen *host_screen;
|
||||||
host_screen_from_window(xev.xconfigure.window);
|
|
||||||
|
|
||||||
if (host_screen && host_screen->win_pre_existing != None) {
|
/* event compression as for Expose events, cause
|
||||||
ev->type = EPHYR_EV_CONFIGURE;
|
* we don't want to resize the framebuffer for
|
||||||
ev->data.configure.width = xev.xconfigure.width;
|
* every single change */
|
||||||
ev->data.configure.height = xev.xconfigure.height;
|
while (XCheckTypedWindowEvent(HostX.dpy, xev.xconfigure.window,
|
||||||
ev->data.configure.window = xev.xconfigure.window;
|
ConfigureNotify, &xev));
|
||||||
ev->data.configure.screen = host_screen->mynum;
|
host_screen = host_screen_from_window(xev.xconfigure.window);
|
||||||
return 1;
|
|
||||||
|
if (!host_screen ||
|
||||||
|
(host_screen->win_pre_existing == None && !EphyrWantResize)) {
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
ev->type = EPHYR_EV_CONFIGURE;
|
||||||
|
ev->data.configure.width = xev.xconfigure.width;
|
||||||
|
ev->data.configure.height = xev.xconfigure.height;
|
||||||
|
ev->data.configure.window = xev.xconfigure.window;
|
||||||
|
ev->data.configure.screen = host_screen->mynum;
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -193,7 +193,8 @@ hostx_set_cmap_entry(unsigned char idx,
|
||||||
unsigned char r, unsigned char g, unsigned char b);
|
unsigned char r, unsigned char g, unsigned char b);
|
||||||
|
|
||||||
void *hostx_screen_init(EphyrScreenInfo screen,
|
void *hostx_screen_init(EphyrScreenInfo screen,
|
||||||
int width, int height, int buffer_height);
|
int width, int height, int buffer_height,
|
||||||
|
int *bytes_per_line, int *bits_per_pixel);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
||||||
|
|
|
@ -465,16 +465,6 @@ fbdevRandRSetConfig(ScreenPtr pScreen,
|
||||||
int oldheight;
|
int oldheight;
|
||||||
int oldmmwidth;
|
int oldmmwidth;
|
||||||
int oldmmheight;
|
int oldmmheight;
|
||||||
int newwidth, newheight;
|
|
||||||
|
|
||||||
if (screen->randr & (RR_Rotate_0 | RR_Rotate_180)) {
|
|
||||||
newwidth = pSize->width;
|
|
||||||
newheight = pSize->height;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
newwidth = pSize->height;
|
|
||||||
newheight = pSize->width;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (wasEnabled)
|
if (wasEnabled)
|
||||||
KdDisableScreen(pScreen);
|
KdDisableScreen(pScreen);
|
||||||
|
|
|
@ -441,10 +441,8 @@ ps2SkipInit(KdPointerInfo * pi, int ninit, Bool ret_next)
|
||||||
{
|
{
|
||||||
Kmouse *km = pi->driverPrivate;
|
Kmouse *km = pi->driverPrivate;
|
||||||
int c = -1;
|
int c = -1;
|
||||||
int skipping;
|
|
||||||
Bool waiting;
|
Bool waiting;
|
||||||
|
|
||||||
skipping = 0;
|
|
||||||
waiting = FALSE;
|
waiting = FALSE;
|
||||||
while (ninit || ret_next) {
|
while (ninit || ret_next) {
|
||||||
c = MouseReadByte(&km->iob, MOUSE_TIMEOUT);
|
c = MouseReadByte(&km->iob, MOUSE_TIMEOUT);
|
||||||
|
@ -469,8 +467,6 @@ static Bool
|
||||||
ps2Init(KdPointerInfo * pi)
|
ps2Init(KdPointerInfo * pi)
|
||||||
{
|
{
|
||||||
Kmouse *km = pi->driverPrivate;
|
Kmouse *km = pi->driverPrivate;
|
||||||
int skipping;
|
|
||||||
Bool waiting;
|
|
||||||
int id;
|
int id;
|
||||||
unsigned char *init;
|
unsigned char *init;
|
||||||
int ninit;
|
int ninit;
|
||||||
|
@ -483,8 +479,6 @@ ps2Init(KdPointerInfo * pi)
|
||||||
*/
|
*/
|
||||||
if (!MouseWriteByte(km->iob.fd, PSMC_SEND_DEV_ID, 100))
|
if (!MouseWriteByte(km->iob.fd, PSMC_SEND_DEV_ID, 100))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
skipping = 0;
|
|
||||||
waiting = FALSE;
|
|
||||||
id = ps2SkipInit(pi, 0, TRUE);
|
id = ps2SkipInit(pi, 0, TRUE);
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 3:
|
case 3:
|
||||||
|
|
|
@ -1821,16 +1821,11 @@ KdEnqueueKeyboardEvent(KdKeyboardInfo * ki,
|
||||||
unsigned char scan_code, unsigned char is_up)
|
unsigned char scan_code, unsigned char is_up)
|
||||||
{
|
{
|
||||||
unsigned char key_code;
|
unsigned char key_code;
|
||||||
KeyClassPtr keyc = NULL;
|
|
||||||
KeybdCtrl *ctrl = NULL;
|
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
if (!ki || !ki->dixdev || !ki->dixdev->kbdfeed || !ki->dixdev->key)
|
if (!ki || !ki->dixdev || !ki->dixdev->kbdfeed || !ki->dixdev->key)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
keyc = ki->dixdev->key;
|
|
||||||
ctrl = &ki->dixdev->kbdfeed->ctrl;
|
|
||||||
|
|
||||||
if (scan_code >= ki->minScanCode && scan_code <= ki->maxScanCode) {
|
if (scan_code >= ki->minScanCode && scan_code <= ki->maxScanCode) {
|
||||||
key_code = scan_code + KD_MIN_KEYCODE - ki->minScanCode;
|
key_code = scan_code + KD_MIN_KEYCODE - ki->minScanCode;
|
||||||
|
|
||||||
|
@ -1864,7 +1859,6 @@ void
|
||||||
KdEnqueuePointerEvent(KdPointerInfo * pi, unsigned long flags, int rx, int ry,
|
KdEnqueuePointerEvent(KdPointerInfo * pi, unsigned long flags, int rx, int ry,
|
||||||
int rz)
|
int rz)
|
||||||
{
|
{
|
||||||
CARD32 ms;
|
|
||||||
unsigned char buttons;
|
unsigned char buttons;
|
||||||
int x, y, z;
|
int x, y, z;
|
||||||
int (*matrix)[3] = kdPointerMatrix.matrix;
|
int (*matrix)[3] = kdPointerMatrix.matrix;
|
||||||
|
@ -1875,8 +1869,6 @@ KdEnqueuePointerEvent(KdPointerInfo * pi, unsigned long flags, int rx, int ry,
|
||||||
if (!pi)
|
if (!pi)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ms = GetTimeInMillis();
|
|
||||||
|
|
||||||
/* we don't need to transform z, so we don't. */
|
/* we don't need to transform z, so we don't. */
|
||||||
if (flags & KD_MOUSE_DELTA) {
|
if (flags & KD_MOUSE_DELTA) {
|
||||||
if (pi->transformCoordinates) {
|
if (pi->transformCoordinates) {
|
||||||
|
|
|
@ -1174,7 +1174,6 @@ void
|
||||||
KdXVDisable(ScreenPtr pScreen)
|
KdXVDisable(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
XvScreenPtr pxvs;
|
XvScreenPtr pxvs;
|
||||||
KdXVScreenPtr ScreenPriv;
|
|
||||||
XvAdaptorPtr pAdaptor;
|
XvAdaptorPtr pAdaptor;
|
||||||
XvPortPtr pPort;
|
XvPortPtr pPort;
|
||||||
XvPortRecPrivatePtr pPriv;
|
XvPortRecPrivatePtr pPriv;
|
||||||
|
@ -1184,7 +1183,6 @@ KdXVDisable(ScreenPtr pScreen)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
pxvs = GET_XV_SCREEN(pScreen);
|
pxvs = GET_XV_SCREEN(pScreen);
|
||||||
ScreenPriv = GET_KDXV_SCREEN(pScreen);
|
|
||||||
|
|
||||||
for (i = 0; i < pxvs->nAdaptors; i++) {
|
for (i = 0; i < pxvs->nAdaptors; i++) {
|
||||||
pAdaptor = &pxvs->pAdaptors[i];
|
pAdaptor = &pxvs->pAdaptors[i];
|
||||||
|
|
|
@ -413,7 +413,6 @@ static void
|
||||||
xf86VTSwitch(void)
|
xf86VTSwitch(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
static int prevSIGIO;
|
|
||||||
InputInfoPtr pInfo;
|
InputInfoPtr pInfo;
|
||||||
IHPtr ih;
|
IHPtr ih;
|
||||||
|
|
||||||
|
|
|
@ -1370,7 +1370,6 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
||||||
int saveType;
|
int saveType;
|
||||||
PixmapFormatRec *BankFormat;
|
PixmapFormatRec *BankFormat;
|
||||||
ClockRangePtr cp;
|
ClockRangePtr cp;
|
||||||
ClockRangePtr storeClockRanges;
|
|
||||||
int numTimings = 0;
|
int numTimings = 0;
|
||||||
range hsync[MAX_HSYNC];
|
range hsync[MAX_HSYNC];
|
||||||
range vrefresh[MAX_VREFRESH];
|
range vrefresh[MAX_VREFRESH];
|
||||||
|
@ -1492,16 +1491,14 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes,
|
||||||
/*
|
/*
|
||||||
* Store the clockRanges for later use by the VidMode extension.
|
* Store the clockRanges for later use by the VidMode extension.
|
||||||
*/
|
*/
|
||||||
storeClockRanges = scrp->clockRanges;
|
nt_list_for_each_entry(cp, clockRanges, next) {
|
||||||
while (storeClockRanges != NULL) {
|
ClockRangePtr newCR = xnfalloc(sizeof(ClockRange));
|
||||||
storeClockRanges = storeClockRanges->next;
|
memcpy(newCR, cp, sizeof(ClockRange));
|
||||||
}
|
newCR->next = NULL;
|
||||||
for (cp = clockRanges; cp != NULL; cp = cp->next,
|
|
||||||
storeClockRanges = storeClockRanges->next) {
|
|
||||||
storeClockRanges = xnfalloc(sizeof(ClockRange));
|
|
||||||
if (scrp->clockRanges == NULL)
|
if (scrp->clockRanges == NULL)
|
||||||
scrp->clockRanges = storeClockRanges;
|
scrp->clockRanges = newCR;
|
||||||
memcpy(storeClockRanges, cp, sizeof(ClockRange));
|
else
|
||||||
|
nt_list_append(newCR, scrp->clockRanges, ClockRange, next);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Determine which pixmap format to pass to scanLineWidth() */
|
/* Determine which pixmap format to pass to scanLineWidth() */
|
||||||
|
|
|
@ -743,7 +743,7 @@ xf86TokenToOptName(const OptionInfoRec * table, int token)
|
||||||
const OptionInfoRec *p;
|
const OptionInfoRec *p;
|
||||||
|
|
||||||
p = xf86TokenToOptinfo(table, token);
|
p = xf86TokenToOptinfo(table, token);
|
||||||
return p->name;
|
return p ? p->name : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
|
|
|
@ -320,15 +320,17 @@ localRegisterFreeBoxCallback(ScreenPtr pScreen,
|
||||||
newCallbacks = realloc(offman->FreeBoxesUpdateCallback,
|
newCallbacks = realloc(offman->FreeBoxesUpdateCallback,
|
||||||
sizeof(FreeBoxCallbackProcPtr) *
|
sizeof(FreeBoxCallbackProcPtr) *
|
||||||
(offman->NumCallbacks + 1));
|
(offman->NumCallbacks + 1));
|
||||||
|
if (!newCallbacks)
|
||||||
|
return FALSE;
|
||||||
|
else
|
||||||
|
offman->FreeBoxesUpdateCallback = newCallbacks;
|
||||||
|
|
||||||
newPrivates = realloc(offman->devPrivates,
|
newPrivates = realloc(offman->devPrivates,
|
||||||
sizeof(DevUnion) * (offman->NumCallbacks + 1));
|
sizeof(DevUnion) * (offman->NumCallbacks + 1));
|
||||||
|
if (!newPrivates)
|
||||||
if (!newCallbacks || !newPrivates)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
else
|
||||||
offman->FreeBoxesUpdateCallback = newCallbacks;
|
offman->devPrivates = newPrivates;
|
||||||
offman->devPrivates = newPrivates;
|
|
||||||
|
|
||||||
offman->FreeBoxesUpdateCallback[offman->NumCallbacks] = FreeBoxCallback;
|
offman->FreeBoxesUpdateCallback[offman->NumCallbacks] = FreeBoxCallback;
|
||||||
offman->devPrivates[offman->NumCallbacks].ptr = devPriv;
|
offman->devPrivates[offman->NumCallbacks].ptr = devPriv;
|
||||||
|
|
|
@ -158,8 +158,10 @@ xf86XvMCScreenInit(ScreenPtr pScreen,
|
||||||
if (!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors)))
|
if (!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0))
|
if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) {
|
||||||
|
free(pAdapt);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (!(pScreenPriv = malloc(sizeof(xf86XvMCScreenRec)))) {
|
if (!(pScreenPriv = malloc(sizeof(xf86XvMCScreenRec)))) {
|
||||||
free(pAdapt);
|
free(pAdapt);
|
||||||
|
|
|
@ -91,15 +91,16 @@ resort(unsigned char *s_block)
|
||||||
unsigned char *d_new, *d_ptr, *d_end, *s_ptr, *s_end;
|
unsigned char *d_new, *d_ptr, *d_end, *s_ptr, *s_end;
|
||||||
unsigned char tmp;
|
unsigned char tmp;
|
||||||
|
|
||||||
|
s_ptr = find_header(s_block);
|
||||||
|
if (!s_ptr)
|
||||||
|
return NULL;
|
||||||
s_end = s_block + EDID1_LEN;
|
s_end = s_block + EDID1_LEN;
|
||||||
|
|
||||||
d_new = malloc(EDID1_LEN);
|
d_new = malloc(EDID1_LEN);
|
||||||
if (!d_new)
|
if (!d_new)
|
||||||
return NULL;
|
return NULL;
|
||||||
d_end = d_new + EDID1_LEN;
|
d_end = d_new + EDID1_LEN;
|
||||||
|
|
||||||
s_ptr = find_header(s_block);
|
|
||||||
if (!s_ptr)
|
|
||||||
return NULL;
|
|
||||||
for (d_ptr = d_new; d_ptr < d_end; d_ptr++) {
|
for (d_ptr = d_new; d_ptr < d_end; d_ptr++) {
|
||||||
tmp = *(s_ptr++);
|
tmp = *(s_ptr++);
|
||||||
*d_ptr = tmp;
|
*d_ptr = tmp;
|
||||||
|
|
|
@ -16,7 +16,6 @@
|
||||||
* Externing inputInfo is not the nice way to do it but it works.
|
* Externing inputInfo is not the nice way to do it but it works.
|
||||||
*/
|
*/
|
||||||
#include "inputstr.h"
|
#include "inputstr.h"
|
||||||
extern InputInfo inputInfo;
|
|
||||||
|
|
||||||
DevPrivateKeyRec xf86CursorScreenKeyRec;
|
DevPrivateKeyRec xf86CursorScreenKeyRec;
|
||||||
|
|
||||||
|
|
|
@ -60,6 +60,9 @@
|
||||||
/* Has backtrace support */
|
/* Has backtrace support */
|
||||||
#undef HAVE_BACKTRACE
|
#undef HAVE_BACKTRACE
|
||||||
|
|
||||||
|
/* Has libunwind support */
|
||||||
|
#undef HAVE_LIBUNWIND
|
||||||
|
|
||||||
/* Define to 1 if you have the <byteswap.h> header file. */
|
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||||
#undef HAVE_BYTESWAP_H
|
#undef HAVE_BYTESWAP_H
|
||||||
|
|
||||||
|
|
|
@ -638,6 +638,11 @@ extern _X_HIDDEN void valuator_set_mode(DeviceIntPtr dev, int axis, int mode);
|
||||||
xfixes/cursor.c uses it to determine if the cursor is enabled */
|
xfixes/cursor.c uses it to determine if the cursor is enabled */
|
||||||
extern Bool EnableCursor;
|
extern Bool EnableCursor;
|
||||||
|
|
||||||
|
/* Set to FALSE by default - ChangeWindowAttributes sets it to TRUE on
|
||||||
|
* CWCursor, xfixes/cursor.c uses it to determine if the cursor is enabled
|
||||||
|
*/
|
||||||
|
extern Bool CursorVisible;
|
||||||
|
|
||||||
extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
|
extern _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators);
|
||||||
extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
|
extern _X_EXPORT void valuator_mask_free(ValuatorMask **mask);
|
||||||
extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
|
extern _X_EXPORT void valuator_mask_set_range(ValuatorMask *mask,
|
||||||
|
|
|
@ -34,6 +34,11 @@ if XDMCP
|
||||||
libos_la_SOURCES += $(XDMCP_SRCS)
|
libos_la_SOURCES += $(XDMCP_SRCS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
if HAVE_LIBUNWIND
|
||||||
|
AM_CFLAGS += $(LIBUNWIND_CFLAGS)
|
||||||
|
libos_la_LIBADD += $(LIBUNWIND_LIBS)
|
||||||
|
endif
|
||||||
|
|
||||||
EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
|
EXTRA_DIST = $(SECURERPC_SRCS) $(XDMCP_SRCS)
|
||||||
|
|
||||||
if SPECIAL_DTRACE_OBJECTS
|
if SPECIAL_DTRACE_OBJECTS
|
||||||
|
|
|
@ -30,6 +30,80 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef HAVE_LIBUNWIND
|
||||||
|
|
||||||
|
#define UNW_LOCAL_ONLY
|
||||||
|
#include <libunwind.h>
|
||||||
|
|
||||||
|
#ifndef _GNU_SOURCE
|
||||||
|
#define _GNU_SOURCE
|
||||||
|
#endif
|
||||||
|
#include <dlfcn.h>
|
||||||
|
|
||||||
|
void
|
||||||
|
xorg_backtrace(void)
|
||||||
|
{
|
||||||
|
unw_cursor_t cursor;
|
||||||
|
unw_context_t context;
|
||||||
|
unw_word_t off;
|
||||||
|
unw_proc_info_t pip;
|
||||||
|
int ret, i = 0;
|
||||||
|
char procname[256];
|
||||||
|
const char *filename;
|
||||||
|
Dl_info dlinfo;
|
||||||
|
|
||||||
|
pip.unwind_info = NULL;
|
||||||
|
ret = unw_getcontext(&context);
|
||||||
|
if (ret) {
|
||||||
|
ErrorFSigSafe("unw_getcontext failed: %s [%d]\n", unw_strerror(ret),
|
||||||
|
ret);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = unw_init_local(&cursor, &context);
|
||||||
|
if (ret) {
|
||||||
|
ErrorFSigSafe("unw_init_local failed: %s [%d]\n", unw_strerror(ret),
|
||||||
|
ret);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ErrorFSigSafe("\n");
|
||||||
|
ErrorFSigSafe("Backtrace:\n");
|
||||||
|
ret = unw_step(&cursor);
|
||||||
|
while (ret > 0) {
|
||||||
|
ret = unw_get_proc_info(&cursor, &pip);
|
||||||
|
if (ret) {
|
||||||
|
ErrorFSigSafe("unw_get_proc_info failed: %s [%d]\n",
|
||||||
|
unw_strerror(ret), ret);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
ret = unw_get_proc_name(&cursor, procname, 256, &off);
|
||||||
|
if (ret && ret != -UNW_ENOMEM) {
|
||||||
|
if (ret != -UNW_EUNSPEC)
|
||||||
|
ErrorFSigSafe("unw_get_proc_name failed: %s [%d]\n",
|
||||||
|
unw_strerror(ret), ret);
|
||||||
|
procname[0] = '?';
|
||||||
|
procname[1] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dladdr((void *)(pip.start_ip + off), &dlinfo) && dlinfo.dli_fname &&
|
||||||
|
*dlinfo.dli_fname)
|
||||||
|
filename = dlinfo.dli_fname;
|
||||||
|
else
|
||||||
|
filename = "?";
|
||||||
|
|
||||||
|
ErrorFSigSafe("%u: %s (%s%s+0x%x) [%p]\n", i++, filename, procname,
|
||||||
|
ret == -UNW_ENOMEM ? "..." : "", (int)off,
|
||||||
|
(void *)(pip.start_ip + off));
|
||||||
|
|
||||||
|
ret = unw_step(&cursor);
|
||||||
|
if (ret < 0)
|
||||||
|
ErrorFSigSafe("unw_step failed: %s [%d]\n", unw_strerror(ret), ret);
|
||||||
|
}
|
||||||
|
ErrorFSigSafe("\n");
|
||||||
|
}
|
||||||
|
#else /* HAVE_LIBUNWIND */
|
||||||
#ifdef HAVE_BACKTRACE
|
#ifdef HAVE_BACKTRACE
|
||||||
#ifndef _GNU_SOURCE
|
#ifndef _GNU_SOURCE
|
||||||
#define _GNU_SOURCE
|
#define _GNU_SOURCE
|
||||||
|
@ -246,3 +320,4 @@ xorg_backtrace(void)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
4
os/log.c
4
os/log.c
|
@ -279,6 +279,10 @@ LogSetParameter(LogParameter param, int value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Signal-safe snprintf, with some limitations over snprintf. Be careful
|
||||||
|
* which directives you use.
|
||||||
|
*/
|
||||||
static int
|
static int
|
||||||
pnprintf(char *string, size_t size, const char *f, va_list args)
|
pnprintf(char *string, size_t size, const char *f, va_list args)
|
||||||
{
|
{
|
||||||
|
|
|
@ -363,13 +363,12 @@ void
|
||||||
RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc)
|
RRCrtcDetachScanoutPixmap(RRCrtcPtr crtc)
|
||||||
{
|
{
|
||||||
ScreenPtr master = crtc->pScreen->current_master;
|
ScreenPtr master = crtc->pScreen->current_master;
|
||||||
int ret;
|
|
||||||
PixmapPtr mscreenpix;
|
PixmapPtr mscreenpix;
|
||||||
rrScrPriv(crtc->pScreen);
|
rrScrPriv(crtc->pScreen);
|
||||||
|
|
||||||
mscreenpix = master->GetScreenPixmap(master);
|
mscreenpix = master->GetScreenPixmap(master);
|
||||||
|
|
||||||
ret = pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL);
|
pScrPriv->rrCrtcSetScanoutPixmap(crtc, NULL);
|
||||||
if (crtc->scanout_pixmap) {
|
if (crtc->scanout_pixmap) {
|
||||||
master->StopPixmapTracking(mscreenpix, crtc->scanout_pixmap);
|
master->StopPixmapTracking(mscreenpix, crtc->scanout_pixmap);
|
||||||
/*
|
/*
|
||||||
|
@ -442,7 +441,7 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
|
||||||
RRCrtcPtr rr_crtc, int x, int y, int w, int h)
|
RRCrtcPtr rr_crtc, int x, int y, int w, int h)
|
||||||
{
|
{
|
||||||
RegionRec root_pixmap_region, total_region, new_crtc_region;
|
RegionRec root_pixmap_region, total_region, new_crtc_region;
|
||||||
int i, c;
|
int c;
|
||||||
BoxRec newbox;
|
BoxRec newbox;
|
||||||
BoxPtr newsize;
|
BoxPtr newsize;
|
||||||
ScreenPtr slave;
|
ScreenPtr slave;
|
||||||
|
@ -502,10 +501,8 @@ rrCheckPixmapBounding(ScreenPtr pScreen,
|
||||||
new_height == screen_pixmap->drawable.height) {
|
new_height == screen_pixmap->drawable.height) {
|
||||||
ErrorF("adjust shatters %d %d\n", newsize->x1, newsize->x2);
|
ErrorF("adjust shatters %d %d\n", newsize->x1, newsize->x2);
|
||||||
} else {
|
} else {
|
||||||
int ret;
|
|
||||||
rrScrPriv(pScreen);
|
rrScrPriv(pScreen);
|
||||||
ret = pScrPriv->rrScreenSetSize(pScreen,
|
pScrPriv->rrScreenSetSize(pScreen, new_width, new_height, 0, 0);
|
||||||
new_width, new_height, 0, 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set shatters TODO */
|
/* set shatters TODO */
|
||||||
|
|
|
@ -129,8 +129,7 @@ typedef struct _CursorScreen {
|
||||||
#define Unwrap(as,s,elt,backup) (((backup) = (s)->elt), (s)->elt = (as)->elt)
|
#define Unwrap(as,s,elt,backup) (((backup) = (s)->elt), (s)->elt = (as)->elt)
|
||||||
|
|
||||||
/* The cursor doesn't show up until the first XDefineCursor() */
|
/* The cursor doesn't show up until the first XDefineCursor() */
|
||||||
static Bool CursorVisible = FALSE;
|
Bool CursorVisible = FALSE;
|
||||||
|
|
||||||
Bool EnableCursor = TRUE;
|
Bool EnableCursor = TRUE;
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
|
@ -142,12 +141,7 @@ CursorDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
||||||
|
|
||||||
Unwrap(cs, pScreen, DisplayCursor, backupProc);
|
Unwrap(cs, pScreen, DisplayCursor, backupProc);
|
||||||
|
|
||||||
/*
|
CursorVisible = CursorVisible && EnableCursor;
|
||||||
* Have to check ConnectionInfo to distinguish client requests from
|
|
||||||
* initial root window setup. Not a great way to do it, I admit.
|
|
||||||
*/
|
|
||||||
if (ConnectionInfo)
|
|
||||||
CursorVisible = EnableCursor;
|
|
||||||
|
|
||||||
if (cs->pCursorHideCounts != NULL || !CursorVisible) {
|
if (cs->pCursorHideCounts != NULL || !CursorVisible) {
|
||||||
ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor);
|
ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor);
|
||||||
|
|
|
@ -3073,6 +3073,7 @@ XkbComputeGetIndicatorMapReplySize(XkbIndicatorPtr indicators,
|
||||||
nIndicators++;
|
nIndicators++;
|
||||||
}
|
}
|
||||||
rep->length = (nIndicators * SIZEOF(xkbIndicatorMapWireDesc)) / 4;
|
rep->length = (nIndicators * SIZEOF(xkbIndicatorMapWireDesc)) / 4;
|
||||||
|
rep->nIndicators = nIndicators;
|
||||||
return Success;
|
return Success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3984,13 +3985,11 @@ _XkbSetNamesCheck(ClientPtr client, DeviceIntPtr dev,
|
||||||
xkbSetNamesReq * stuff, CARD32 *data)
|
xkbSetNamesReq * stuff, CARD32 *data)
|
||||||
{
|
{
|
||||||
XkbDescRec *xkb;
|
XkbDescRec *xkb;
|
||||||
XkbNamesRec *names;
|
|
||||||
CARD32 *tmp;
|
CARD32 *tmp;
|
||||||
Atom bad;
|
Atom bad;
|
||||||
|
|
||||||
tmp = data;
|
tmp = data;
|
||||||
xkb = dev->key->xkbInfo->desc;
|
xkb = dev->key->xkbInfo->desc;
|
||||||
names = xkb->names;
|
|
||||||
|
|
||||||
if (stuff->which & XkbKeyTypeNamesMask) {
|
if (stuff->which & XkbKeyTypeNamesMask) {
|
||||||
int i;
|
int i;
|
||||||
|
|
151
xkb/xkbActions.c
151
xkb/xkbActions.c
|
@ -222,7 +222,6 @@ _XkbFilterSetState(XkbSrvInfoPtr xkbi,
|
||||||
|
|
||||||
#define LATCH_KEY_DOWN 1
|
#define LATCH_KEY_DOWN 1
|
||||||
#define LATCH_PENDING 2
|
#define LATCH_PENDING 2
|
||||||
#define NO_LATCH 3
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_XkbFilterLatchState(XkbSrvInfoPtr xkbi,
|
_XkbFilterLatchState(XkbSrvInfoPtr xkbi,
|
||||||
|
@ -230,6 +229,7 @@ _XkbFilterLatchState(XkbSrvInfoPtr xkbi,
|
||||||
{
|
{
|
||||||
|
|
||||||
if (filter->keycode == 0) { /* initial press */
|
if (filter->keycode == 0) { /* initial press */
|
||||||
|
AccessXCancelRepeatKey(xkbi,keycode);
|
||||||
filter->keycode = keycode;
|
filter->keycode = keycode;
|
||||||
filter->active = 1;
|
filter->active = 1;
|
||||||
filter->filterOthers = 1;
|
filter->filterOthers = 1;
|
||||||
|
@ -250,91 +250,102 @@ _XkbFilterLatchState(XkbSrvInfoPtr xkbi,
|
||||||
else if (pAction && (filter->priv == LATCH_PENDING)) {
|
else if (pAction && (filter->priv == LATCH_PENDING)) {
|
||||||
if (((1 << pAction->type) & XkbSA_BreakLatch) != 0) {
|
if (((1 << pAction->type) & XkbSA_BreakLatch) != 0) {
|
||||||
filter->active = 0;
|
filter->active = 0;
|
||||||
if (filter->upAction.type == XkbSA_LatchMods)
|
/* If one latch is broken, all latches are broken, so it's no use
|
||||||
xkbi->state.latched_mods &= ~filter->upAction.mods.mask;
|
to find out which particular latch this filter tracks. */
|
||||||
else
|
xkbi->state.latched_mods = 0;
|
||||||
xkbi->state.latched_group -=
|
xkbi->state.latched_group = 0;
|
||||||
XkbSAGroup(&filter->upAction.group);
|
|
||||||
}
|
|
||||||
else if ((pAction->type == filter->upAction.type) &&
|
|
||||||
(pAction->mods.flags == filter->upAction.mods.flags) &&
|
|
||||||
(pAction->mods.mask == filter->upAction.mods.mask)) {
|
|
||||||
if (filter->upAction.mods.flags & XkbSA_LatchToLock) {
|
|
||||||
XkbControlsPtr ctrls = xkbi->desc->ctrls;
|
|
||||||
|
|
||||||
if (filter->upAction.type == XkbSA_LatchMods)
|
|
||||||
pAction->mods.type = XkbSA_LockMods;
|
|
||||||
else
|
|
||||||
pAction->group.type = XkbSA_LockGroup;
|
|
||||||
if (XkbAX_NeedFeedback(ctrls, XkbAX_StickyKeysFBMask) &&
|
|
||||||
(ctrls->enabled_ctrls & XkbStickyKeysMask)) {
|
|
||||||
XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LOCK,
|
|
||||||
XkbStickyKeysMask);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
if (filter->upAction.type == XkbSA_LatchMods)
|
|
||||||
pAction->mods.type = XkbSA_SetMods;
|
|
||||||
else
|
|
||||||
pAction->group.type = XkbSA_SetGroup;
|
|
||||||
}
|
|
||||||
if (filter->upAction.type == XkbSA_LatchMods)
|
|
||||||
xkbi->state.latched_mods &= ~filter->upAction.mods.mask;
|
|
||||||
else
|
|
||||||
xkbi->state.latched_group -=
|
|
||||||
XkbSAGroup(&filter->upAction.group);
|
|
||||||
filter->active = 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (filter->keycode == keycode) { /* release */
|
else if (filter->keycode == keycode && filter->priv != LATCH_PENDING){
|
||||||
|
/* The test above for LATCH_PENDING skips subsequent releases of the
|
||||||
|
key after it has been released first time and the latch became
|
||||||
|
pending. */
|
||||||
XkbControlsPtr ctrls = xkbi->desc->ctrls;
|
XkbControlsPtr ctrls = xkbi->desc->ctrls;
|
||||||
int needBeep;
|
int needBeep = ((ctrls->enabled_ctrls & XkbStickyKeysMask) &&
|
||||||
int beepType = _BEEP_NONE;
|
XkbAX_NeedFeedback(ctrls, XkbAX_StickyKeysFBMask));
|
||||||
|
|
||||||
needBeep = ((ctrls->enabled_ctrls & XkbStickyKeysMask) &&
|
|
||||||
XkbAX_NeedFeedback(ctrls, XkbAX_StickyKeysFBMask));
|
|
||||||
if (filter->upAction.type == XkbSA_LatchMods) {
|
if (filter->upAction.type == XkbSA_LatchMods) {
|
||||||
xkbi->clearMods = filter->upAction.mods.mask;
|
unsigned char mask = filter->upAction.mods.mask;
|
||||||
if ((filter->upAction.mods.flags & XkbSA_ClearLocks) &&
|
unsigned char common;
|
||||||
(xkbi->clearMods & xkbi->state.locked_mods) ==
|
|
||||||
xkbi->clearMods) {
|
xkbi->clearMods = mask;
|
||||||
xkbi->state.locked_mods &= ~xkbi->clearMods;
|
|
||||||
filter->priv = NO_LATCH;
|
/* ClearLocks */
|
||||||
beepType = _BEEP_STICKY_UNLOCK;
|
common = mask & xkbi->state.locked_mods;
|
||||||
|
if ((filter->upAction.mods.flags & XkbSA_ClearLocks) && common) {
|
||||||
|
mask &= ~common;
|
||||||
|
xkbi->state.locked_mods &= ~common;
|
||||||
|
if (needBeep)
|
||||||
|
XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_UNLOCK,
|
||||||
|
XkbStickyKeysMask);
|
||||||
|
}
|
||||||
|
/* LatchToLock */
|
||||||
|
common = mask & xkbi->state.latched_mods;
|
||||||
|
if ((filter->upAction.mods.flags & XkbSA_LatchToLock) && common) {
|
||||||
|
unsigned char newlocked;
|
||||||
|
|
||||||
|
mask &= ~common;
|
||||||
|
newlocked = common & ~xkbi->state.locked_mods;
|
||||||
|
if(newlocked){
|
||||||
|
xkbi->state.locked_mods |= newlocked;
|
||||||
|
if (needBeep)
|
||||||
|
XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LOCK,
|
||||||
|
XkbStickyKeysMask);
|
||||||
|
|
||||||
|
}
|
||||||
|
xkbi->state.latched_mods &= ~common;
|
||||||
|
}
|
||||||
|
/* Latch remaining modifiers, if any. */
|
||||||
|
if (mask) {
|
||||||
|
xkbi->state.latched_mods |= mask;
|
||||||
|
filter->priv = LATCH_PENDING;
|
||||||
|
if (needBeep)
|
||||||
|
XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LATCH,
|
||||||
|
XkbStickyKeysMask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
xkbi->groupChange = -XkbSAGroup(&filter->upAction.group);
|
xkbi->groupChange = -XkbSAGroup(&filter->upAction.group);
|
||||||
|
/* ClearLocks */
|
||||||
if ((filter->upAction.group.flags & XkbSA_ClearLocks) &&
|
if ((filter->upAction.group.flags & XkbSA_ClearLocks) &&
|
||||||
(xkbi->state.locked_group)) {
|
(xkbi->state.locked_group)) {
|
||||||
xkbi->state.locked_group = 0;
|
xkbi->state.locked_group = 0;
|
||||||
filter->priv = NO_LATCH;
|
if (needBeep)
|
||||||
beepType = _BEEP_STICKY_UNLOCK;
|
XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_UNLOCK,
|
||||||
|
XkbStickyKeysMask);
|
||||||
|
}
|
||||||
|
/* LatchToLock */
|
||||||
|
else if ((filter->upAction.group.flags & XkbSA_LatchToLock)
|
||||||
|
&& (xkbi->state.latched_group)) {
|
||||||
|
xkbi->state.locked_group += XkbSAGroup(&filter->upAction.group);
|
||||||
|
xkbi->state.latched_group -= XkbSAGroup(&filter->upAction.group);
|
||||||
|
if(XkbSAGroup(&filter->upAction.group) && needBeep)
|
||||||
|
XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LOCK,
|
||||||
|
XkbStickyKeysMask);
|
||||||
|
}
|
||||||
|
/* Latch group */
|
||||||
|
else if(XkbSAGroup(&filter->upAction.group)){
|
||||||
|
xkbi->state.latched_group += XkbSAGroup(&filter->upAction.group);
|
||||||
|
filter->priv = LATCH_PENDING;
|
||||||
|
if (needBeep)
|
||||||
|
XkbDDXAccessXBeep(xkbi->device, _BEEP_STICKY_LATCH,
|
||||||
|
XkbStickyKeysMask);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (filter->priv == NO_LATCH) {
|
|
||||||
|
if (filter->priv != LATCH_PENDING)
|
||||||
filter->active = 0;
|
filter->active = 0;
|
||||||
}
|
|
||||||
else {
|
|
||||||
filter->priv = LATCH_PENDING;
|
|
||||||
if (filter->upAction.type == XkbSA_LatchMods) {
|
|
||||||
xkbi->state.latched_mods |= filter->upAction.mods.mask;
|
|
||||||
needBeep = xkbi->state.latched_mods ? needBeep : 0;
|
|
||||||
xkbi->state.latched_mods |= filter->upAction.mods.mask;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
xkbi->state.latched_group +=
|
|
||||||
XkbSAGroup(&filter->upAction.group);
|
|
||||||
}
|
|
||||||
if (needBeep && (beepType == _BEEP_NONE))
|
|
||||||
beepType = _BEEP_STICKY_LATCH;
|
|
||||||
}
|
|
||||||
if (needBeep && (beepType != _BEEP_NONE))
|
|
||||||
XkbDDXAccessXBeep(xkbi->device, beepType, XkbStickyKeysMask);
|
|
||||||
}
|
}
|
||||||
else if (filter->priv == LATCH_KEY_DOWN) {
|
else if (pAction && (filter->priv == LATCH_KEY_DOWN)) {
|
||||||
filter->priv = NO_LATCH;
|
/* Latch was broken before it became pending: degrade to a
|
||||||
filter->filterOthers = 0;
|
SetMods/SetGroup. */
|
||||||
|
if (filter->upAction.type == XkbSA_LatchMods)
|
||||||
|
filter->upAction.type = XkbSA_SetMods;
|
||||||
|
else
|
||||||
|
filter->upAction.type = XkbSA_SetGroup;
|
||||||
|
filter->filter = _XkbFilterSetState;
|
||||||
|
filter->priv = 0;
|
||||||
|
return filter->filter(xkbi, filter, keycode, pAction);
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue