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> 2005-06-10 Johannes E. Schindelin <Johannes.Schindelin@gmx.de>
* configure.ac: fix that annoying SUN /usr/ccs location of "ar" * configure.ac: fix that annoying SUN /usr/ccs location of "ar"
......
...@@ -58,6 +58,8 @@ AH_TEMPLATE(HAVE_LIBXFIXES, [XFIXES extension build environment present]) ...@@ -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_LIBXDAMAGE, [XDAMAGE extension build environment present])
AH_TEMPLATE(HAVE_LIBXTRAP, [DEC-XTRAP 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_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 if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
AC_CHECK_LIB(X11, XGetImage, HAVE_X="true", AC_CHECK_LIB(X11, XGetImage, HAVE_X="true",
HAVE_X="false", HAVE_X="false",
...@@ -70,6 +72,14 @@ if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then ...@@ -70,6 +72,14 @@ if test "$X_CFLAGS" != "-DX_DISPLAY_MISSING"; then
[AC_DEFINE(HAVE_XSHM)], , [AC_DEFINE(HAVE_XSHM)], ,
$X_LIBS $X_PRELIBS -lX11 $X_EXTRA_LIBS) $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, AC_CHECK_LIB(Xtst, XTestGrabControl,
X_PRELIBS="$X_PRELIBS -lXtst" X_PRELIBS="$X_PRELIBS -lXtst"
[AC_DEFINE(HAVE_XTESTGRABCONTROL) HAVE_XTESTGRABCONTROL="true"], , [AC_DEFINE(HAVE_XTESTGRABCONTROL) HAVE_XTESTGRABCONTROL="true"], ,
......
...@@ -525,7 +525,7 @@ void rfbShowCursor(rfbClientPtr cl) ...@@ -525,7 +525,7 @@ void rfbShowCursor(rfbClientPtr cl)
int gmax, gshift; int gmax, gshift;
int bmax, bshift; int bmax, bshift;
int amax = 255; /* alphaSource is always 8bits of info per pixel */ 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; rmax = s->serverFormat.redMax;
gmax = s->serverFormat.greenMax; gmax = s->serverFormat.greenMax;
...@@ -544,8 +544,9 @@ void rfbShowCursor(rfbClientPtr cl) ...@@ -544,8 +544,9 @@ void rfbShowCursor(rfbClientPtr cl)
* we loop over the whole cursor ignoring c->mask[], * we loop over the whole cursor ignoring c->mask[],
* using the extracted alpha value instead. * using the extracted alpha value instead.
*/ */
char *dest, *src, *aptr; char *dest;
unsigned long val, *dv, *sv; unsigned char *src, *aptr;
unsigned int val, dval, sval;
int rdst, gdst, bdst; /* fb RGB */ int rdst, gdst, bdst; /* fb RGB */
int asrc, rsrc, gsrc, bsrc; /* rich source ARGB */ int asrc, rsrc, gsrc, bsrc; /* rich source ARGB */
...@@ -553,23 +554,42 @@ void rfbShowCursor(rfbClientPtr cl) ...@@ -553,23 +554,42 @@ void rfbShowCursor(rfbClientPtr cl)
src = c->richSource + (j+j1)*c->width*bpp + (i+i1)*bpp; src = c->richSource + (j+j1)*c->width*bpp + (i+i1)*bpp;
aptr = c->alphaSource + (j+j1)*c->width + (i+i1); aptr = c->alphaSource + (j+j1)*c->width + (i+i1);
dv = (unsigned long *)dest; asrc = *aptr;
sv = (unsigned long *)src;
asrc = *((unsigned char *)aptr);
if (!asrc) { if (!asrc) {
continue; 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 */ /* extract dest and src RGB */
rdst = (*dv & rmask) >> rshift; /* fb */ rdst = (dval & rmask) >> rshift; /* fb */
gdst = (*dv & gmask) >> gshift; gdst = (dval & gmask) >> gshift;
bdst = (*dv & bmask) >> bshift; bdst = (dval & bmask) >> bshift;
rsrc = (*sv & rmask) >> rshift; /* richcursor */ rsrc = (sval & rmask) >> rshift; /* richcursor */
gsrc = (*sv & gmask) >> gshift; gsrc = (sval & gmask) >> gshift;
bsrc = (*sv & bmask) >> bshift; bsrc = (sval & bmask) >> bshift;
/* blend in fb data. */ /* blend in fb data. */
if (! c->alphaPreMultiplied) { 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> 2005-06-03 Karl Runge <runge@karlrunge.com>
* make scrollcopyrect more or less usable under -scale * make scrollcopyrect more or less usable under -scale
* add -fixscreen for periodic cleanup of painting errors. * 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 ...@@ -164,16 +164,18 @@ Misc
-- D -- D
=F rc: =F rc:
norc norc
nolookup
-- --
nofb nofb
-- --
=D nobell =D nobell
=D nosel =D nosel
noprimary noprimary
nolookup seldir:
-- --
xtrap xtrap
xrecord xrecord
=RA reset_record
-- --
bg bg
=-C:ignore,exit sigpipe: =-C:ignore,exit sigpipe:
......
...@@ -170,16 +170,18 @@ ...@@ -170,16 +170,18 @@
" -- D\n" " -- D\n"
" =F rc:\n" " =F rc:\n"
" norc\n" " norc\n"
" nolookup\n"
" --\n" " --\n"
" nofb\n" " nofb\n"
" --\n" " --\n"
" =D nobell\n" " =D nobell\n"
" =D nosel\n" " =D nosel\n"
" noprimary\n" " noprimary\n"
" nolookup\n" " seldir:\n"
" --\n" " --\n"
" xtrap\n" " xtrap\n"
" xrecord\n" " xrecord\n"
" =RA reset_record\n"
" --\n" " --\n"
" bg\n" " bg\n"
" =-C:ignore,exit sigpipe:\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