Commit 543e64d3 authored by runge's avatar runge

main.c: XReadScreen check, fix 64bit use of cursors, x11vnc: first round of...

 main.c: XReadScreen check, fix 64bit use of cursors, x11vnc: first round of beta-testing fixes, RFE's.
parent 50568f1a
2005-06-14 Karl Runge <runge@karlrunge.com>
* configure.ac: XReadScreen and XReadDisplay checks.
* libvncserver/cursor.c: fix unsigned long crash for 64bits.
* x11vnc: first round of beta-testing fixes, RFE's.
2005-06-10 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* configure.ac: fix that annoying SUN /usr/ccs location of "ar"
......
......@@ -58,6 +58,8 @@ AH_TEMPLATE(HAVE_LIBXFIXES, [XFIXES extension build environment present])
AH_TEMPLATE(HAVE_LIBXDAMAGE, [XDAMAGE extension build environment present])
AH_TEMPLATE(HAVE_LIBXTRAP, [DEC-XTRAP extension build environment present])
AH_TEMPLATE(HAVE_RECORD, [RECORD extension build environment present])
AH_TEMPLATE(HAVE_SOLARIS_XREADSCREEN, [Solaris XReadScreen available])
AH_TEMPLATE(HAVE_IRIX_XREADDISPLAY, [IRIX XReadDisplay available])
if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
AC_CHECK_LIB(X11, XGetImage, HAVE_X="true",
HAVE_X="false",
......@@ -70,6 +72,14 @@ if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
[AC_DEFINE(HAVE_XSHM)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
AC_CHECK_LIB(Xext, XReadScreen,
[AC_DEFINE(HAVE_SOLARIS_XREADSCREEN)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS)
AC_CHECK_HEADER(X11/extensions/readdisplay.h,
[AC_DEFINE(HAVE_IRIX_XREADDISPLAY)], ,
[#include <X11/Xlib.h>])
AC_CHECK_LIB(Xtst, XTestGrabControl,
X_PRELIBS="$X_PRELIBS -lXtst"
[AC_DEFINE(HAVE_XTESTGRABCONTROL) HAVE_XTESTGRABCONTROL="true"], ,
......
......@@ -525,7 +525,7 @@ void rfbShowCursor(rfbClientPtr cl)
int gmax, gshift;
int bmax, bshift;
int amax = 255; /* alphaSource is always 8bits of info per pixel */
unsigned long rmask, gmask, bmask;
unsigned int rmask, gmask, bmask;
rmax = s->serverFormat.redMax;
gmax = s->serverFormat.greenMax;
......@@ -544,8 +544,9 @@ void rfbShowCursor(rfbClientPtr cl)
* we loop over the whole cursor ignoring c->mask[],
* using the extracted alpha value instead.
*/
char *dest, *src, *aptr;
unsigned long val, *dv, *sv;
char *dest;
unsigned char *src, *aptr;
unsigned int val, dval, sval;
int rdst, gdst, bdst; /* fb RGB */
int asrc, rsrc, gsrc, bsrc; /* rich source ARGB */
......@@ -553,23 +554,42 @@ void rfbShowCursor(rfbClientPtr cl)
src = c->richSource + (j+j1)*c->width*bpp + (i+i1)*bpp;
aptr = c->alphaSource + (j+j1)*c->width + (i+i1);
dv = (unsigned long *)dest;
sv = (unsigned long *)src;
asrc = *((unsigned char *)aptr);
asrc = *aptr;
if (!asrc) {
continue;
}
if (bpp == 1) {
dval = *((unsigned char*) dest);
sval = *((unsigned char*) src);
} else if (bpp == 2) {
dval = *((unsigned short*) dest);
sval = *((unsigned short*) src);
} else if (bpp == 3) {
unsigned char *dst = (unsigned char *) dest;
dval = 0;
dval |= ((*(dst+0)) << 0);
dval |= ((*(dst+1)) << 8);
dval |= ((*(dst+2)) << 16);
sval = 0;
sval |= ((*(src+0)) << 0);
sval |= ((*(src+1)) << 8);
sval |= ((*(src+2)) << 16);
} else if (bpp == 4) {
dval = *((unsigned int*) dest);
sval = *((unsigned int*) src);
} else {
continue;
}
/* extract dest and src RGB */
rdst = (*dv & rmask) >> rshift; /* fb */
gdst = (*dv & gmask) >> gshift;
bdst = (*dv & bmask) >> bshift;
rdst = (dval & rmask) >> rshift; /* fb */
gdst = (dval & gmask) >> gshift;
bdst = (dval & bmask) >> bshift;
rsrc = (*sv & rmask) >> rshift; /* richcursor */
gsrc = (*sv & gmask) >> gshift;
bsrc = (*sv & bmask) >> bshift;
rsrc = (sval & rmask) >> rshift; /* richcursor */
gsrc = (sval & gmask) >> gshift;
bsrc = (sval & bmask) >> bshift;
/* blend in fb data. */
if (! c->alphaPreMultiplied) {
......
2005-06-14 Karl Runge <runge@karlrunge.com>
* -DNOGUI and -DVIEWONLY build options
* -noskip_dups the default (windows viewer sends no ups when
repeating)
* HAVE_SOLARIS_XREADSCREEN and HAVE_IRIX_XREADDISPLAY
* Alt+Button+Motion to wireframe. tunable in WIREFRAME_PARMS
* copyrect now the default under -scale (works OK, but must
send a cleanup update)
* fix -pedantic and Sun cc warnings and errors (unsigned, etc..)
* print out fatal error messages under -quiet
* -seldir to control and debug selection transfers.
* fix crashes on 64bit wrt unsigned long in rich cursors.
* fix kde guessing errors
* more scrolling and wireframe tweaks.
2005-06-03 Karl Runge <runge@karlrunge.com>
* make scrollcopyrect more or less usable under -scale
* add -fixscreen for periodic cleanup of painting errors.
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -164,16 +164,18 @@ Misc
-- D
=F rc:
norc
nolookup
--
nofb
--
=D nobell
=D nosel
noprimary
nolookup
seldir:
--
xtrap
xrecord
=RA reset_record
--
bg
=-C:ignore,exit sigpipe:
......
......@@ -170,16 +170,18 @@
" -- D\n"
" =F rc:\n"
" norc\n"
" nolookup\n"
" --\n"
" nofb\n"
" --\n"
" =D nobell\n"
" =D nosel\n"
" noprimary\n"
" nolookup\n"
" seldir:\n"
" --\n"
" xtrap\n"
" xrecord\n"
" =RA reset_record\n"
" --\n"
" bg\n"
" =-C:ignore,exit sigpipe:\n"
......
This diff is collapsed.
This diff is collapsed.
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