debian/0000775000000000000000000000000012310370661007167 5ustar debian/copyright0000664000000000000000000000252311700642007011122 0ustar This package was debianized by Sam Johnston on Wed, 27 Jun 2001 00:52:32 +1000. Adopted by Laszlo Boszormenyi (GCS) on Tue Oct 17 23:37:49 CEST 2006 from Tomas Fasth . It was downloaded from http://www.rdesktop.org Upstream Author: Matthew Chapman Copyright: Copyright (C) Matthew Chapman 1999-2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version, with the additional exemption that compiling, linking, and/or using OpenSSL together with this software is allowed. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in the `/usr/share/common-licenses' directory. debian/README.source0000664000000000000000000000211011700642007011336 0ustar This package uses dpatch to manage all modifications to the upstream source. Changes are stored in the source package as diffs in debian/patches and applied during the build. To get the fully patched source after unpacking the source package, cd to the root level of the source package and run: debian/rules patch Removing a patch is as simple as removing its entry from the debian/patches/00list file, and please also remove the patch file itself. Creating a new patch is done with "dpatch-edit-patch patch XX_patchname" where you should replace XX with a new number and patchname with a descriptive shortname of the patch. You can then simply edit all the files your patch wants to edit, and then simply "exit 0" from the shell to actually create the patch file. To tweak an already existing patch, call "dpatch-edit-patch XX_patchname" and replace XX_patchname with the actual filename from debian/patches you want to use. To clean up afterwards again, "debian/rules unpatch" will do the work for you - or you can of course choose to call "fakeroot debian/rules clean" all together. debian/changelog0000664000000000000000000002507712310370657011061 0ustar rdesktop (1.7.1-1ubuntu2) trusty; urgency=low * Use autotools-dev helper for newer arches. -- Daniel T Chen Thu, 13 Mar 2014 13:57:51 -0400 rdesktop (1.7.1-1ubuntu1) quantal; urgency=low * Resynchronise with Debian. Remaining changes: - debian/control: Build-depend on libsamplerate-dev. -- Colin Watson Fri, 27 Apr 2012 14:09:38 +0100 rdesktop (1.7.1-1) unstable; urgency=low * New upstream release, update patches to apply clean. * Enable smartcard support (closes: #546713). * Enable RandR extension support. -- Laszlo Boszormenyi (GCS) Wed, 08 Feb 2012 09:38:40 +0000 rdesktop (1.7.0-2) unstable; urgency=low * Switch to 3.0 (quilt) source format, remove dpatch build dependency. Update 90_update_smartcard_api.dpatch to apply clean, remove 80_config.dpatch as it's not needed anymore. * Enable hardened build flags, patch from Moritz Muehlenhoff (closes: #653498). * Update packaging bits. * Mention Windows Server support in package description (closes: #623777). -- Laszlo Boszormenyi (GCS) Tue, 03 Jan 2012 19:08:18 +0100 rdesktop (1.7.0-1ubuntu2) oneiric; urgency=low * Rebuild for OpenSSL 1.0.0. -- Colin Watson Tue, 17 May 2011 11:48:11 +0100 rdesktop (1.7.0-1ubuntu1) oneiric; urgency=low * Merge from debian unstable. Remaining changes: - debian/control: - Build-depend on libsamplerate-dev -- Stéphane Graber Wed, 04 May 2011 13:17:42 -0400 rdesktop (1.7.0-1) unstable; urgency=high * New upstream release, fixing CVE-2010-1595 (closes: #623552). * Remove 15_lp192218.dpatch , 16_lp667275.dpatch and 35_force_rdpdr.dpatch this release contains them; update other patches to match this release. -- Laszlo Boszormenyi (GCS) Thu, 21 Apr 2011 19:43:08 +0200 rdesktop (1.6.0-4) unstable; urgency=low * Fix 64 bit crashes due to incorrectly sized Xorg properties (closes: #617731). * Add missing '-r clipboard' option to manpage (closes: #506893). * Add viewport patch from Ubuntu. * Fix minor packaging issues. -- Laszlo Boszormenyi (GCS) Sat, 26 Mar 2011 13:11:06 +0100 rdesktop (1.6.0-3ubuntu4) natty; urgency=low * debian/patches/debian/patches/16_lp667275.dpatch: fix more 64bit crashes, from upstream, thanks to Stephan Diestelhorst (LP: #667275). -- Kees Cook Thu, 10 Mar 2011 15:55:09 -0800 rdesktop (1.6.0-3ubuntu3) natty; urgency=low * debian/patches/15_lp192218.dpatch: fix -g workarea on 64 bit machines (LP: #192218) -- Jamie Strandboge Wed, 09 Mar 2011 15:18:10 -0600 rdesktop (1.6.0-3ubuntu2) maverick; urgency=low * debian/patches/02_raw_keyboard_support.patch: - Drop patch as it is causing a number of problems in non-raw mode (LP: #494311) -- Robert Ancell Fri, 10 Sep 2010 11:53:46 +1000 rdesktop (1.6.0-3ubuntu1) maverick; urgency=low * Merge from Debian unstable, remaining Ubuntu changes: * debian/control: - Build-depend on libsamplerate-dev * debian/patches/01_paging.patch: - Add viewport patch. -- Robert Ancell Wed, 16 Jun 2010 15:57:28 +1000 rdesktop (1.6.0-3) unstable; urgency=low [ Patrick Calhoun ] * debian/patches/35_force_rdpdr.dpatch: Backported patch From Sameer Naik to init rdpdr. ( http://article.gmane.org/gmane.network.rdesktop.devel/2808 ) * debian/patches/32_it_keymap.dpatch: Italian keymap (closes: #540352). * debian/patches/80_config.dpatch: use autotools config.guess, config.sub (moved script from debian/rules to the dpatch system) * Compile with alsa sound support enabled (closes: #507654). * Added libasound2-dev, dpatch (>= 2.0.9) to build-depends * Update debhelper-compat to 6 (was 4) , no changes needed. * Modified debian/rules to build using dpatch [ Laszlo Boszormenyi ] * Added watch file (closes: #519065). * Moved nostrip option handling to 80_handle_nostrip_option.dpatch as using dpatch now. * Added pkg-config to build-depends, needs for detecting ALSA availability. * Updated Standards-Version to 3.8.2 , no changes needed. -- Laszlo Boszormenyi (GCS) Thu, 20 Aug 2009 23:07:08 +0000 rdesktop (1.6.0-2) unstable; urgency=low * Compile with IPv6 support (closes: #432299). * Remove obsolete x-dev build-dependency. * Adhere to policy 10.1 , don't stip binary if nostrip specified in DEB_BUILD_OPTIONS (closes: #437887). * Update Standards-Version to 3.8.0 , no changes needed. -- Laszlo Boszormenyi (GCS) Sat, 16 Aug 2008 14:40:47 +0000 rdesktop (1.6.0-1ubuntu1) intrepid; urgency=low * Merge from Debian unstable * Remaining Ubuntu changes: - Replace x-dev with libx11-dev in Build-Depends. - Build with ALSA support. - Add viewport patch. * Add patch from Alt Linux that adds support for raw keyboard. (LP: #251709) -- Steve Kowalik Mon, 28 Jul 2008 12:49:31 +1000 rdesktop (1.6.0-1) unstable; urgency=low * New stable upstream release (closes: #484071). -- Laszlo Boszormenyi (GCS) Wed, 04 Jun 2008 09:24:17 +0200 rdesktop (1.6.0-0ubuntu2) intrepid; urgency=low * Add in dpatch. * Merge viewport patch from the package in the ubuntu-mobile PPA. * Munge Maintainer as per spec. -- Steve Kowalik Fri, 27 Jun 2008 14:53:29 +1000 rdesktop (1.6.0-0ubuntu1) intrepid; urgency=low * merge new upstream version. LP: #235160 * new upstream fixes security issues. LP: #228193 * replace x-dev with libx11-dev in build-depends. * build with alsa support. add libasound2-dev and libsamplerate to build dependencies. LP: #231997 -- Reinhard Tartler Tue, 27 May 2008 23:48:23 +0200 rdesktop (1.5.0-4+cvs20071006) unstable; urgency=high * Fix three security bugs by backporting them to this CVS snapshot, namely CVE-2008-1801 , CVE-2008-1802 and CVE-2008-1803 (closes: #480133, #480134, #480135). -- Laszlo Boszormenyi (GCS) Thu, 08 May 2008 18:54:16 +0200 rdesktop (1.5.0-3+cvs20071006) unstable; urgency=low * Fix segfault in XGetPointerMapping() thanks to Felix Domke (closes: #445779). -- Laszlo Boszormenyi (GCS) Sun, 21 Oct 2007 21:34:16 +0200 rdesktop (1.5.0-2+cvs20071006) unstable; urgency=low * CVS snapshot. -- Laszlo Boszormenyi (GCS) Sat, 06 Oct 2007 10:20:59 +0200 rdesktop (1.5.0-2) unstable; urgency=low * Fix segfault regression caused by libx11-6 security fix. -- Laszlo Boszormenyi (GCS) Thu, 12 Apr 2007 21:34:13 +0000 rdesktop (1.5.0-1) unstable; urgency=low * New upstream release (closes: #393520), accept Victor's change (closes: #343946). * New maintainer with ACK from Tomas. * Tune packaging. -- Laszlo Boszormenyi (GCS) Tue, 17 Oct 2006 21:31:16 +0000 rdesktop (1.4.1-1.1) unstable; urgency=low * Non-maintainer upload. * xlibs-dev transition. -- Victor Seva Sat, 17 Dec 2005 16:17:35 +0100 rdesktop (1.4.1-1) unstable; urgency=low * New upstream release. -- Tomas Fasth Tue, 24 May 2005 13:31:34 +0000 rdesktop (1.4.0-2) unstable; urgency=low * New maintainer. * Update Standards-Version to 3.6.1 -- Tomas Fasth Fri, 15 Apr 2005 17:47:28 +0000 rdesktop (1.4.0-1) unstable; urgency=low * NMU: New upstream release with a nod from Sam. * NMU: Fixed debian/rules to come clean with lintian as follows; Man page now goes to /usr/share/man instead of /usr/X11R6/man. Calling dh_installchangelogs before calling dh_installdocs. -- Tomas Fasth Wed, 13 Apr 2005 22:59:56 +0000 rdesktop (1.3.1-1.1) unstable; urgency=low * NMU: apply XEmbed patch, Closes: #268896 -- Riku Voipio Sat, 6 Nov 2004 10:09:21 +0000 rdesktop (1.3.1-1) unstable; urgency=low * New upstream release * Removes unnecessary manpage. Closes: #223832. -- Sam Johnston Wed, 4 Feb 2004 17:52:26 +1100 rdesktop (1.3.0-1) unstable; urgency=medium * New upstream release * Adds ChangeLog. Closes: #189667. * Adds RDP5 support. Closes: #212362. * Resolves keymap problems. Closes: #198201. * Adds upstream documentation. Closes: #189666. -- Sam Johnston Thu, 30 Oct 2003 13:09:41 +1100 rdesktop (1.2.0-2) unstable; urgency=medium * resolves lintian warnings: out-of-date-standards-version, copyright-lists-upstream-authors-with-dh_make-boilerplate, postinst-should-not-set-usr-doc-link * built against libssl0.9.7. Closes: #180997. * updates maintainer email address * no upstream changelog - 1.2.0 changes listed below. Closes: #186974. * new more portable key mapping code * support for high (128-bit) encryption * toggling out of full-screen mode with Ctrl-Alt-Enter * a few extra options including host:port syntax * many, many bug fixes and optimisations -- Sam Johnston Tue, 8 Apr 2003 13:56:51 +1000 rdesktop (1.2.0-1) unstable; urgency=low * New upstream release. Closes: #179546. -- Sam Johnston Sun, 23 Feb 2003 17:22:28 +1100 rdesktop (1.2beta1-1) unstable; urgency=low * New upstream version released (beta) * License exemption obtained for OpenSSL. Closes: #172574. -- Sam Johnston Sun, 8 Dec 2002 15:00:42 +1100 rdesktop (1.1.0-2) unstable; urgency=low * Moved into main (http://www.debian.org/legal/cryptoinmain) -- Sam Johnston Sat, 23 Mar 2002 21:43:05 +1100 rdesktop (1.1.0-1) unstable; urgency=low * New upstream version released * Incorporates many fixes from the unified patches: http://bibl4.oru.se/projects/rdesktop/patch19-changes.txt * Keyboard support fixes and official manpage to be included in next release -- Sam Johnston Mon, 17 Sep 2001 23:52:08 +1000 rdesktop (1.0.0+19.6.6-2.1) unstable; urgency=low * NMU (for porting) * Change rdesktop.h to include and define L_ENDIAN / B_ENDIAN based on that. Closes: #103409 #103499 * Change rdesktop.h to define NEEDS_ALIGN on all architecture except i386. -- Matthew Wilcox Wed, 11 Jul 2001 20:04:56 -0400 rdesktop (1.0.0+19.6.6-2) unstable; urgency=low * Rebuild with sane version of dpkg-dev -- Sam Johnston Tue, 3 Jul 2001 00:12:06 +1000 rdesktop (1.0.0+19.6.6-1) unstable; urgency=low * Initial Release. -- Sam Johnston Wed, 27 Jun 2001 23:53:17 +1000 Local variables: mode: debian-changelog End: debian/docs0000664000000000000000000000021411700642007010035 0ustar doc/AUTHORS doc/HACKING doc/TODO doc/ipv6.txt doc/keymap-names.txt doc/keymapping.txt doc/licensing.txt doc/patches.txt doc/redirection.txt debian/patches/0000775000000000000000000000000011714443571010626 5ustar debian/patches/90-snprintf-format-fix.patch0000664000000000000000000000124311714443562016012 0ustar Description: add missing format string to snprintf's Last-Update: <2012-02-08> --- rdesktop-1.7.1.orig/rdesktop.c +++ rdesktop-1.7.1/rdesktop.c @@ -1584,7 +1584,7 @@ load_licence(unsigned char **data) if (home == NULL) return -1; - snprintf((char*)hi, 16, g_hostname); + snprintf((char*)hi, 16, "%s", g_hostname); sec_hash_sha1_16(ho, hi, g_static_rdesktop_salt_16); sec_hash_to_string(hash, 40, ho, 22); @@ -1634,7 +1634,7 @@ save_licence(unsigned char *data, int le return; } - snprintf((char*)hi,16,g_hostname); + snprintf((char*)hi,16,"%s",g_hostname); sec_hash_sha1_16(ho, hi, g_static_rdesktop_salt_16); sec_hash_to_string(hash, 40, ho, 20); debian/patches/32_it_keymap.dpatch0000775000000000000000000000144411700642007014275 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## it_keymap.dpatch by Patrick Calhoun ## (original patch by Luca Tettamanti ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Italian Keyboard map that includes brace characters. @DPATCH@ diff -urNad rdesktop-1.6.0~/keymaps/it rdesktop-1.6.0/keymaps/it --- rdesktop-1.6.0~/keymaps/it 2003-11-03 08:54:52.000000000 -0600 +++ rdesktop-1.6.0/keymaps/it 2009-08-19 15:29:22.000000000 -0500 @@ -58,11 +58,11 @@ egrave 0x1a eacute 0x1a shift bracketleft 0x1a altgr -dead_abovering 0x1a shift altgr +braceleft 0x1a shift altgr plus 0x1b asterisk 0x1b shift bracketright 0x1b altgr -dead_macron 0x1b shift altgr +braceright 0x1b shift altgr ae 0x1e altgr AE 0x1e shift altgr ssharp 0x1f altgr debian/patches/series0000664000000000000000000000131211714443473012041 0ustar # Nomenclature for the file ordering/naming # First digit: # 1 -> Has been applied in some branch upstream. # It will eventually be applied in a release # 2 -> Has been or will be fixed differently upstream # 3 -> Pending upstream. Waiting to land on a branch or some review, # or some asked modifications # 6 -> Not yet sent upstream # 8 -> Debian specific. This we don't want to send upstream or that # upstream don't want to apply. # # Second digit: # 0 -> Build system # 1 -> Mostly build # 2 -> Preferences # 5 -> General code # 8 -> Fix for some architectures support # 01_paging.dpatch 20_update_manpage.dpatch 32_it_keymap.dpatch 80_handle_nostrip_option.dpatch 90-snprintf-format-fix.patch debian/patches/20_update_manpage.dpatch0000775000000000000000000000146111700642007015261 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 20_update_manpage.dpatch by Laszlo Boszormenyi ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Add the missing '-r clipboard' option to manpage. @DPATCH@ --- del/rdesktop-1.6.0/doc/rdesktop.1 2007-01-19 14:47:35.000000000 +0100 +++ rdesktop-1.6.0/doc/rdesktop.1 2011-03-26 13:55:09.806570001 +0100 @@ -215,6 +215,10 @@ - optional device vendor name. For list of examples run rdesktop without parameters. .TP +.BR "-r clipboard:[off|PRIMARYCLIPBOARD|CLIPBOARD]" +Enable clipboard redirection. 'PRIMARYCLIPBOARD' looks at both PRIMARY and +CLIPBOARD when sending data to server. 'CLIPBOARD' looks at only CLIPBOARD. +.TP .BR "-0" Attach to the console of the server (requires Windows Server 2003 or newer). debian/patches/01_paging.dpatch0000775000000000000000000002365311714441504013566 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 01_paging.dpatch by Adilson Oliveira ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Add viewport mode, suitable for small screens. @DPATCH@ diff -Nur rdesktop-1.7.0.orig/proto.h rdesktop-1.7.0/proto.h --- rdesktop-1.7.0.orig/proto.h 2011-04-18 13:21:57.000000000 +0200 +++ rdesktop-1.7.0/proto.h 2011-04-21 21:04:40.702453001 +0200 @@ -236,7 +236,7 @@ RD_BOOL ui_init(void); void ui_init_connection(void); void ui_deinit(void); -RD_BOOL ui_create_window(void); +RD_BOOL ui_create_window(RD_BOOL ToggleFullscreen); void ui_resize_window(void); void ui_destroy_window(void); void xwin_toggle_fullscreen(void); diff -Nur rdesktop-1.7.0.orig/rdesktop.c rdesktop-1.7.0/rdesktop.c --- rdesktop-1.7.0.orig/rdesktop.c 2011-04-18 13:21:57.000000000 +0200 +++ rdesktop-1.7.0/rdesktop.c 2011-04-21 21:04:40.703453001 +0200 @@ -119,6 +119,13 @@ uint8 g_client_random[SEC_RANDOM_SIZE]; RD_BOOL g_pending_resize = False; +/* For viewport mode */ +int xo = 0; +int yo = 0; +int perm_xo = 0; // Safe to keep in 0 for now +int perm_yo = 0; +RD_BOOL viewport_mode = False; + #ifdef WITH_RDPSND RD_BOOL g_rdpsnd = False; #endif @@ -138,6 +145,7 @@ rdp2vnc_connect(char *server, uint32 flags, char *domain, char *password, char *shell, char *directory); #endif + /* Display usage information */ static void usage(char *program) @@ -624,6 +632,8 @@ g_pos |= (*p == '-') ? 4 : 1; g_ypos = strtol(p, NULL, 10); } + perm_xo = xo; + perm_yo = yo; break; @@ -1016,7 +1026,7 @@ memset(password, 0, sizeof(password)); if (!g_redirect) - if (!ui_create_window()) + if (!ui_create_window(False)) return EX_OSERR; g_redirect = False; diff -Nur rdesktop-1.7.0.orig/xwin.c rdesktop-1.7.0/xwin.c --- rdesktop-1.7.0.orig/xwin.c 2011-04-18 13:21:57.000000000 +0200 +++ rdesktop-1.7.0/xwin.c 2011-04-21 21:04:40.704453001 +0200 @@ -55,7 +55,11 @@ static int g_x_socket; static Screen *g_screen; Window g_wnd; - +extern BOOL viewport_mode; +BOOL viewport_keys_enabled = False; +BOOL viewport_mode_locked = False; +Window g_viewport_wnd = 0; +uint32 g_embed_wnd; /* SeamlessRDP support */ typedef struct _seamless_group { @@ -140,6 +144,27 @@ ('host' is the machine running rdesktop; the host simply memcpy's so its endianess doesn't matter) */ +static Cursor viewportCursor; +static int viewportLastX; +static int viewportLastY; +int g_viewport_width; +int g_viewport_height; +int g_saved_viewport_width = 0; +int g_saved_viewport_height= 0; +int g_saved_viewport_x= 0; +int g_saved_viewport_y= 0; +int g_saved_wnd_x = 0; +int g_saved_wnd_y = 0; +int g_wnd_x; +int g_wnd_y; +int viewport_x1; +int viewport_y1; +int xo; +int yo; +extern int perm_xo; +extern int perm_yo; + +void MoveViewport(int hShift, int vShift); static RD_BOOL g_no_translate_image = False; /* endianness */ @@ -530,7 +555,7 @@ return; } - XChangeProperty(g_display, wnd, hintsatom, hintsatom, 32, PropModeReplace, + XChangeProperty(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, hintsatom, hintsatom, 32, PropModeReplace, (unsigned char *) &motif_hints, PROP_MOTIF_WM_HINTS_ELEMENTS); } @@ -1994,7 +2019,7 @@ } RD_BOOL -ui_create_window(void) +ui_create_window(RD_BOOL ToggleFullscreen) { uint8 null_pointer_mask[1] = { 0x80 }; uint8 null_pointer_data[24] = { 0x00 }; @@ -2005,6 +2030,7 @@ int wndwidth, wndheight; long input_mask, ic_input_mask; XEvent xevent; + int x1, y1; wndwidth = g_fullscreen ? WidthOfScreen(g_screen) : g_width; wndheight = g_fullscreen ? HeightOfScreen(g_screen) : g_height; @@ -2039,7 +2065,75 @@ XSetForeground(g_display, g_gc, BlackPixelOfScreen(g_screen)); XFillRectangle(g_display, g_backstore, g_gc, 0, 0, g_width, g_height); } - + if ((((g_width >= WidthOfScreen(g_screen)*1.05)) || + (g_height >= (HeightOfScreen(g_screen)*1.1))) && (ToggleFullscreen)) + { + viewport_mode_locked = True; + viewport_keys_enabled = True; + } + + if ((!g_embed_wnd) && (viewport_mode)) + { + if (g_fullscreen) + { + x1 = (WidthOfScreen(g_screen) - g_width)/2; + y1 = (HeightOfScreen(g_screen) - g_height)/2; + g_viewport_width = (WidthOfScreen(g_screen)); + g_viewport_height= (HeightOfScreen(g_screen)); + } + else + { + if (!ToggleFullscreen) + { + xo = g_saved_viewport_x; + yo = g_saved_viewport_y; + } + if (g_saved_wnd_x == 0 && g_saved_wnd_y == 0) + { + x1 = y1 = 0; + } + else + { + x1 = g_saved_wnd_x; + y1 = g_saved_wnd_y; + } + + if (g_saved_viewport_width && g_saved_viewport_height) + { + g_viewport_width = g_saved_viewport_width; + g_viewport_height = g_saved_viewport_height; + } + else + { + g_viewport_width = wndwidth < (WidthOfScreen(g_screen)*1.05) ? wndwidth : WidthOfScreen(g_screen)*3/4; + g_viewport_height= wndheight< (HeightOfScreen(g_screen)*1.1) ? wndheight: HeightOfScreen(g_screen)*3/4; + g_viewport_width = g_viewport_width & ~3; + } + } + + attribs.override_redirect = g_fullscreen; + + if (viewport_mode) + { + if ((xo == 0) && (yo == 0)) + { + xo = (WidthOfScreen(g_screen) - g_viewport_width)/2; + yo = (HeightOfScreen(g_screen) - g_viewport_height)/2; + } + g_viewport_wnd = XCreateWindow (g_display, RootWindowOfScreen(g_screen), xo, yo, g_viewport_width, g_viewport_height, + 0, g_depth, InputOutput, g_visual, CWBackPixel | CWBackingStore | CWOverrideRedirect | CWColormap | CWBorderPixel, &attribs); + + XSelectInput(g_display, g_viewport_wnd, ButtonPressMask | KeyPressMask | + StructureNotifyMask | (g_fullscreen ? EnterWindowMask : 0) | + (g_grab_keyboard ? (EnterWindowMask | LeaveWindowMask) : 0)); + + XReparentWindow (g_display, g_wnd, g_viewport_wnd, (ToggleFullscreen && g_fullscreen) ? perm_xo : 0, (ToggleFullscreen && g_fullscreen) ? perm_yo : 0); + } + } + + /* Check XStoreName consistency */ + + XStoreName(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, g_title); XStoreName(g_display, g_wnd, g_title); ewmh_set_wm_name(g_wnd, g_title); @@ -2050,7 +2144,7 @@ if (classhints != NULL) { classhints->res_name = classhints->res_class = "rdesktop"; - XSetClassHint(g_display, g_wnd, classhints); + XSetClassHint(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, classhints); XFree(classhints); } @@ -2062,7 +2156,7 @@ sizehints->flags |= PPosition; sizehints->min_width = sizehints->max_width = g_width; sizehints->min_height = sizehints->max_height = g_height; - XSetWMNormalHints(g_display, g_wnd, sizehints); + XSetWMNormalHints(g_display, g_viewport_wnd ? g_viewport_wnd : g_wnd, sizehints); XFree(sizehints); } @@ -2087,7 +2181,12 @@ #ifdef HAVE_XRANDR XSelectInput(g_display, RootWindowOfScreen(g_screen), StructureNotifyMask); #endif - XMapWindow(g_display, g_wnd); + if (viewport_mode) + { + XMapWindow (g_display, g_viewport_wnd); + } + + XMapWindow(g_display, g_wnd); /* wait for VisibilityNotify */ do @@ -2157,7 +2256,14 @@ if (g_IC != NULL) XDestroyIC(g_IC); - XDestroyWindow(g_display, g_wnd); + if (g_viewport_wnd) + { + XDestroyWindow (g_display, g_viewport_wnd); + } + else + { + XDestroyWindow(g_display, g_wnd); + } g_wnd = 0; if (g_backstore) @@ -2185,7 +2291,7 @@ ui_destroy_window(); g_fullscreen = !g_fullscreen; - ui_create_window(); + ui_create_window(True); XDefineCursor(g_display, g_wnd, g_current_cursor); @@ -2408,6 +2514,21 @@ xevent.xmotion.y_root - g_move_y_offset); break; } + + if (viewportCursor) + { + /* + * Pointer is in viewport navigation mode. + */ + + MoveViewport(viewportLastX - xevent.xmotion.x_root, + viewportLastY - xevent.xmotion.y_root); + + viewportLastX = xevent.xmotion.x_root; + viewportLastY = xevent.xmotion.y_root; + + break; + } if (g_fullscreen && !g_focused) XSetInputFocus(g_display, g_wnd, RevertToPointerRoot, @@ -3764,6 +3885,83 @@ XFree(image); } +void MoveViewport(int hShift, int vShift) +{ + int newX; + int newY; + Bool do_move = False; + int viewportXSpan = g_viewport_width - g_width; + int viewportYSpan = g_viewport_height - g_height; + + if (!g_viewport_wnd) + { + return; + } + + /* + * We must keep x coordinate between viewportXSpan and zero, if viewportXSpan + * is less then zero. If viewportXSpan is greater or equal to zero, it means + * the agent root window has a size smaller than the agent default window. + * In this case we keep the old coordinate. + */ + + if (viewportXSpan < 0) + { + newX = g_wnd_x - hShift; + + if (newX > 0) + { + newX = 0; + } + else if (newX < viewportXSpan) + { + newX = viewportXSpan; + } + } + else if (viewportXSpan == 0) + { + newX = 0; + } + else + { + newX = g_wnd_x; + } + + if (viewportYSpan < 0) + { + newY = g_wnd_y - vShift; + if (newY > 0) + { + newY = 0; + } + else if (newY < viewportYSpan) + { + newY = viewportYSpan; + } + } + else if (viewportYSpan == 0) + { + newY = 0; + } + else + { + newY = g_wnd_y; + } + if (newX != g_wnd_x) + { + g_wnd_x = newX; + do_move = True; + } + if (newY != g_wnd_y) + { + g_wnd_y = newY; + do_move = True; + } + + if (do_move) + XMoveWindow(g_display, g_wnd, g_wnd_x, g_wnd_y); +} + /* these do nothing here but are used in uiports */ void debian/patches/80_handle_nostrip_option.dpatch0000775000000000000000000000125011700642007016712 0ustar #! /bin/sh /usr/share/dpatch/dpatch-run ## 80_handle_nostrip_option.dpatch by Laszlo Boszormenyi . ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Don't strip binary if asked for nostrip via DEB_BUILD_OPTIONS . @DPATCH@ --- rdesktop-1.6.0.orig/Makefile.in +++ rdesktop-1.6.0/Makefile.in @@ -18,7 +18,11 @@ INSTALL = @INSTALL@ CFLAGS = @CFLAGS@ @X_CFLAGS@ @DEFS@ -DKEYMAP_PATH=\"$(KEYMAP_PATH)\" LDFLAGS = @LDFLAGS@ @LIBS@ @X_LIBS@ @X_EXTRA_LIBS@ +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) STRIP = @STRIP@ +else +STRIP=/bin/true +endif TARGETS = rdesktop @RDP2VNCTARGET@ VNCINC = @VNCINC@ debian/watch0000664000000000000000000000010411700642007010211 0ustar version=3 http://www.rdesktop.org/ .*/rdesktop-([\d\.]+)\.tar\.gz.* debian/control0000664000000000000000000000151211746514730010602 0ustar Source: rdesktop Section: x11 Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Laszlo Boszormenyi (GCS) Build-Depends: debhelper (>= 6.0.0), pkg-config, autoconf, automake, autotools-dev, libasound2-dev, libxt-dev, libx11-dev, libssl-dev, libxrandr-dev, libpcsclite-dev, libsamplerate-dev Standards-Version: 3.9.2 Package: rdesktop Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Suggests: pcscd Description: RDP client for Windows NT/2000 Terminal Server and Windows Servers rdesktop is an open source client for Windows NT/2000 Terminal Server and Windows Server 2003/2008. Capable of natively speaking its Remote Desktop Protocol (RDP) in order to present the user's Windows desktop. Unlike Citrix ICA, no server extensions are required. debian/source/0000775000000000000000000000000011700643533010472 5ustar debian/source/format0000664000000000000000000000001411700643533011700 0ustar 3.0 (quilt) debian/compat0000664000000000000000000000000211700642007010363 0ustar 6 debian/rules0000775000000000000000000000365012310370631010250 0ustar #!/usr/bin/make -f # -*- makefile -*- # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # These are used for cross-compiling and for saving the configure script # from having to guess our platform (since we know it already) DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) CFLAGS = `dpkg-buildflags --get CFLAGS` CFLAGS += -Wall LDFLAGS_DEF += `dpkg-buildflags --get LDFLAGS` CPPFLAGS_DEF = `dpkg-buildflags --get CPPFLAGS` config.status: configure.ac dh_testdir dh_autotools-dev_updateconfig ./bootstrap CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS_DEF)" LDFLAGS="$(LDFLAGS_DEF)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-ipv6 --with-sound=alsa --enable-smartcard build-arch: build-stamp build-indep: build-stamp build: build-arch build-indep build-stamp: config.status dh_testdir $(MAKE) touch build-stamp clean: dh_testdir dh_testroot rm -f build-stamp [ ! -f Makefile ] || $(MAKE) distclean #ifneq "$(wildcard /usr/share/misc/config.sub)" "" # cp -f /usr/share/misc/config.sub config.sub #endif #ifneq "$(wildcard /usr/share/misc/config.guess)" "" # cp -f /usr/share/misc/config.guess config.guess #endif rm -f config.log aclocal.m4 configure dh_autotools-dev_restoreconfig dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs $(MAKE) install DESTDIR=$(CURDIR)/debian/rdesktop binary-indep: build install binary-arch: build install dh_testdir dh_testroot dh_installchangelogs doc/ChangeLog dh_installexamples dh_install dh_installmenu dh_installman dh_installdocs dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install