X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=vncterm.c;h=ff24953b8e6780ba24cc1a8489a7fb40de4bd820;hb=0a1c12502f38fcefc6279a4440660a31b109bf40;hp=ed77f58c7ce28270e77d557a7f8e05b1bf52c884;hpb=07a910f022130194e5e3a762351d5613211e814d;p=vncterm.git diff --git a/vncterm.c b/vncterm.c index ed77f58..ff24953 100644 --- a/vncterm.c +++ b/vncterm.c @@ -2201,6 +2201,63 @@ new_client (rfbClientPtr client) static char *vncticket = NULL; +static void +MakeRichCursor(rfbScreenInfoPtr rfbScreen) +{ + int w = 16, + h = 16; + rfbCursorPtr c = rfbScreen->cursor; + char bitmap[] = + " " + " x " + " xx " + " xxx " + " xxxx " + " xxxxx " + " xxxxxx " + " xxxxxxx " + " xxxxxxxx " + " xxxxxxxxx " + " xxxxxxxxxx " + " xxxx " + " xxx " + " xx " + " x " + " "; + char edge[] = + " " + " x " + " xx " + " x x " + " x x " + " x x " + " x x " + " x x " + " x x " + " x x " + " x xxxxxx " + " x x " + " x x " + " xx " + " x " + " "; + + c = rfbScreen->cursor = rfbMakeXCursor(w,h,bitmap,bitmap); + c->richSource = (unsigned char*)calloc(w*h, 1); + c->cleanupRichSource = TRUE; + + for(int j=0;jrichSource[pos] = 15; // white + } else { + c->richSource[pos] = 0; // black + } + } + } +} + vncTerm * create_vncterm (int argc, char** argv, int maxx, int maxy) { @@ -2208,6 +2265,7 @@ create_vncterm (int argc, char** argv, int maxx, int maxy) rfbScreenInfoPtr screen = rfbGetScreen (&argc, argv, maxx, maxy, 8, 1, 1); screen->frameBuffer=(char*)calloc(maxx*maxy, 1); + MakeRichCursor(screen); char **passwds = calloc(sizeof(char**), 2);