diff --git a/guacamole/proxy/Makefile b/guacamole/proxy/Makefile index c68fe1931..34b3ddfb2 100644 --- a/guacamole/proxy/Makefile +++ b/guacamole/proxy/Makefile @@ -4,16 +4,16 @@ all: guacd guacd: daemon.o proxy.o guacio.o - $(CC) -g daemon.o proxy.o guacio.o -l png -l vncclient -o guacd + $(CC) -O2 daemon.o proxy.o guacio.o -l png -l vncclient -o guacd proxy.o: proxy.c proxy.h guacio.h - $(CC) -g -c -ansi -pedantic proxy.c + $(CC) -O2 -c -ansi -pedantic proxy.c guacio.o: guacio.c guacio.h - $(CC) -g -c -ansi -pedantic guacio.c + $(CC) -O2 -c -ansi -pedantic guacio.c daemon.o: daemon.c proxy.h - $(CC) -g -c -ansi -pedantic daemon.c + $(CC) -O2 -c -ansi -pedantic daemon.c clean: $(RM) *.o guacd diff --git a/guacamole/proxy/proxy.c b/guacamole/proxy/proxy.c index a187467ca..0838a8af5 100644 --- a/guacamole/proxy/proxy.c +++ b/guacamole/proxy/proxy.c @@ -93,6 +93,22 @@ void guac_send_size(GUACIO* io, int w, int h) { guac_write_string(io, ";"); } +void guac_send_copy(GUACIO* io, int srcx, int srcy, int w, int h, int dstx, int dsty) { + guac_write_string(io, "copy:"); + guac_write_int(io, srcx); + guac_write_string(io, ","); + guac_write_int(io, srcy); + guac_write_string(io, ","); + guac_write_int(io, w); + guac_write_string(io, ","); + guac_write_int(io, h); + guac_write_string(io, ","); + guac_write_int(io, dstx); + guac_write_string(io, ","); + guac_write_int(io, dsty); + guac_write_string(io, ";"); +} + void guac_send_png(GUACIO* io, int x, int y, png_byte** png_rows, int w, int h) { png_structp png; @@ -210,6 +226,15 @@ void guac_vnc_update(rfbClient* client, int x, int y, int w, int h) { } +void guac_vnc_copyrect(rfbClient* client, int src_x, int src_y, int w, int h, int dest_x, int dest_y) { + + GUACIO* io = rfbClientGetClientData(client, __GUAC_VNC_TAG_IO); + + guac_send_copy(io, src_x, src_y, w, h, dest_x, dest_y); + guac_flush(io); + +} + char* guac_vnc_get_password(rfbClient* client) { /* Freed after use by libvncclient */ @@ -240,6 +265,7 @@ void proxy(int client_fd) { /* Framebuffer update handler */ rfb_client->GotFrameBufferUpdate = guac_vnc_update; + /*rfb_client->GotCopyRect = guac_vnc_copyrect;*/ /* Password */ rfb_client->GetPassword = guac_vnc_get_password;