Commit Graph

297 Commits

Author SHA1 Message Date
Peter Åstrand
279cfc334d Fix SeamlessRDP bugs related to maximized Windows:
* Fix ewmhints.c:ewmh_get_window_state was not working on 64 bit
  platforms. 

* In EWMH, HIDDEN overrides MAXIMIZED_VERT/MAXIMIZED_HORZ. 

* Finally, if we receive a POSITION when window is maximized or
  minimized, it's wrong to simply ignore the POSITION and simply set
  the local values to what the server gave us. Instead, we are sending
  back a new POSITION. 




git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1739 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-17 13:11:22 +00:00
Henrik Andersson
eced6ca821 Reconnect upon network failure, retry as long the autoreconnect
cookie is valid.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1707 423420c4-83ab-492f-b58f-81f9feb106b5
2013-04-12 06:46:07 +00:00
Henrik Andersson
11dcd976f9 Fixes bug with mouse scroll handling.
X mouse scroll events comes as mouse button press and release
events. On the windows sider the release is interpreted as an
additional scroll down event.

Thanks goes to David Fries for this patch.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1699 423420c4-83ab-492f-b58f-81f9feb106b5
2013-03-22 10:07:14 +00:00
Henrik Andersson
c56a8c180c Changes the approach of how seamlessrdpshell is used and
breaks backward compabilities with old commandline arguments.

The -A argument does now require an string to seamlessrdp shell,
and argument -s has now a splitted meaning, in seamless mode it
does specify a application to start, and in standard mode it works
just like it worked before.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1692 423420c4-83ab-492f-b58f-81f9feb106b5
2013-01-25 14:10:11 +00:00
Henrik Andersson
be93803129 Intitial implementation of seamless connection sharing:
- Implementation of ctrl functionality were slaves can call
  a method into existing master process, more information is
  found in doc/ctrl.txt

- Implementation of new seamless SPAWN functionality so which
  is used by the ctrl to spawn processes in a seamless rdp session
  out of process.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1689 423420c4-83ab-492f-b58f-81f9feb106b5
2013-01-21 12:28:14 +00:00
Peter Åstrand
5cb7910413 Indented with indent-all.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1670 423420c4-83ab-492f-b58f-81f9feb106b5
2012-10-23 11:38:27 +00:00
Henrik Andersson
dcbf2e37c5 seamless_restack_test() leaves events on queue which breaks seamless
functionality, added event processing and wait for DestroyNotify for
the testing windows to empty the queue before leaving the test function.

git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1663 423420c4-83ab-492f-b58f-81f9feb106b5
2012-06-29 06:38:33 +00:00
Peter Åstrand
b638882347 Include emails in copyright statements.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1615 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 11:13:04 +00:00
Peter Åstrand
27068f53f8 Updated the copyright notices for the things we have been working on.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1612 423420c4-83ab-492f-b58f-81f9feb106b5
2011-04-13 08:55:42 +00:00
Peter Åstrand
6ee9faeffc Added RandR support: If the specified geometry depends on the screen
size, and the screen size is changed, rdesktop will automatically
reconnect using the new screen size. This feature uses the previously
implemented autoreconnect feature. 

The new UI function ui_seamless_end() has been introduced, to make it
possible to resize in seamless mode as well. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1556 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-20 09:59:47 +00:00
Peter Åstrand
c47cb3018d Since the backing store is created in ui_create_window, free it in
ui_destroy_window, for symmetry. This is also necessary when
reconnecting with a different size, since the backing store size needs
to be changed.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1555 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-18 10:06:54 +00:00
Peter Åstrand
6b7a66eebf We have been handling the special "relative" session sizes (workarea
and percent of screen) by abusing the g_width variable. However, this
is only works once, since g_width in this case is calculated using
itself. This will not work if we want to support xrandr. Besides, it's
quite ugly.

The patch changes this so that a separate variable, g_sizeopt, is used. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1551 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-14 15:53:24 +00:00
Peter Åstrand
28ba7a082a g_wnd is not a pointer. Use 0 instead of NULL to avoid warnings.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1548 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-13 16:22:35 +00:00
Peter Åstrand
9a926834ff Improve robustness: Make sure we don't act on window events for
windows that no longer exists. (This shouldn't happen with the current
code base, but will be a problem when multiple main windows and
created and destroyed through the process lifetime.)



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1546 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-13 14:53:43 +00:00
Peter Åstrand
ea2bdbc96b This patch is a re-work of patch r1538. One one hand, the plain old
behaviour of setting the session size in ui_init is not going to work,
due to xrandr, as pointed out in r1538. However, the approach
implemented in this revision doesn't work either: When the window is
created before the connection, this means that as soon as X11 events
are recieved, this is going to trigger RDP transmissions. For example,
a call to reset_modifiers_keys. But if the RDP connection is not
ready, the WTS is not prepared to handle such data. We must wait with,
for example, keyboard input until the connection is READY. OTOH, we
can't just ignore those X11 events; that might lead to that we are not
sending information that we need to send. 

So, it is actually better to wait with creating the window until we
have been connected. An additional advantage of this is that for the
load balancing / session directory case, there's no risk of confusion
of which RDP connection we are actually sending data to. 

The previous behaviour of creating the window after we have been
connected has been restored.

Since we still need to set connection data (currently screen size) on
a per connection basis, we need to create a new UI function for this.

Non-X11 backends need to implement this new function. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1545 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-13 13:51:06 +00:00
Peter Åstrand
d0327a9989 Moved code that determines desktop size from ui_init to
ui_create_window. ui_init is only called once during the execution,
but the size of the screen can change, for example, when resizing
using Xrandr. 

Note however that this also means that ui_create_window must be called
before rdp_connect. rdesktop.c has been modified accordingly. One
additional advantage is that you will get a window during the
connection phase, which gives the user better feedback in case the
connection takes time. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1538 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-12 10:19:35 +00:00
Peter Åstrand
adbb524e13 The background_pixel was specified twice, both as black and
white. Leave it as black. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1537 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-12 09:58:16 +00:00
Peter Åstrand
281d7c9f06 Changed license to GPLv3
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1534 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-12 08:31:06 +00:00
Peter Åstrand
a410341c11 Indented on Fedora 11
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1525 423420c4-83ab-492f-b58f-81f9feb106b5
2010-01-07 18:39:20 +00:00
Jay Sorg
c0197b7be2 Fix annoying problem where screen doesn't update until you move the mouse, caused by xwin.c revision 886
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1521 423420c4-83ab-492f-b58f-81f9feb106b5
2009-10-25 23:37:26 +00:00
Jay Sorg
fdcd8d7591 added new pointers
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1520 423420c4-83ab-492f-b58f-81f9feb106b5
2009-10-25 21:36:17 +00:00
Peter Åstrand
bbeb187681 When modifiers are used and a key is released, the generated keysym
might be different from the one generated when the key was
pressed. This can happen if the user physically releases the modifier
key before the symbol key. It can also happen with VNC servers such as
Xvnc, since it only "fakes" the correct modifiers during key
presses. So, we must remember which keysym that was used during the
key press, and use the same on release, otherwise keys such as the
Windows key can be stuck activated. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1512 423420c4-83ab-492f-b58f-81f9feb106b5
2009-09-17 13:52:04 +00:00
Peter Åstrand
c7feab2840 Ran indent-all
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1484 423420c4-83ab-492f-b58f-81f9feb106b5
2008-11-25 08:05:25 +00:00
Jay Sorg
c3dc159869 brush cache for > 2 color brushes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1482 423420c4-83ab-492f-b58f-81f9feb106b5
2008-11-01 02:37:10 +00:00
Jay Sorg
88855ddcbf update the copyright year
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1474 423420c4-83ab-492f-b58f-81f9feb106b5
2008-07-11 03:51:23 +00:00
Peter Åstrand
f6d95062f2 Indented
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1468 423420c4-83ab-492f-b58f-81f9feb106b5
2008-04-24 14:13:28 +00:00
Matt Chapman
231c3f1285 Fix bug #1886199 (tracked down by nicolyon@users.sourceforge.net).
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1463 423420c4-83ab-492f-b58f-81f9feb106b5
2008-04-05 05:56:26 +00:00
Peter Åstrand
a37022eba5 Moved call to seamless_restack_test from ui_init to end of
ui_create_window. This seems to fix problems the WTS disconnecting the
session due to "DATA ENCRYPTION" errors. At this point, it's unknown
why this patch fixes the problem, but ui_create_window is a good place
for seamless_restack_test() in any case.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1462 423420c4-83ab-492f-b58f-81f9feb106b5
2008-03-28 11:36:15 +00:00
Peter Åstrand
af3925665a Decreased timeout in sw_wait_configurenotify to one second, to reduce
frusrtation with old metacity versions. Need to use gettimeofday.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1460 423420c4-83ab-492f-b58f-81f9feb106b5
2008-03-26 17:16:32 +00:00
Peter Åstrand
3a949d3127 Re-worked the support for SeamlessRDP window stacking:
* Since many window managers cannot properly restack a window between
two other windows, we need to check for this at startup.

* A new utility function, sw_wait_configurenotify, is used to wait for
the WM to process our restacking request.

* We are using XReconfigureWMWindow instead of XRestackWindows and
XRaiseWindow, to easier meet the demands of ICCCM. Restacking between
is only done if the WM is not broken, though.

* The error handler does not ignore BadMatch from ConfigureWindow
requests any longer. I haven't found any WM that gives BadMatch for
XReconfigureWMWindow.

* The test cases has been updated to test more stacking cases.


A somewhat related bug fix wrt focus handling is also included, which
prevents FOCUS messages when reverting focus from a destroyed window


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1458 423420c4-83ab-492f-b58f-81f9feb106b5
2008-03-26 16:44:55 +00:00
Peter Åstrand
d654753ea6 SeamlessRDP bugfix: The first window to XRestackWindows should be the
reference window (the "behind" window); not the window to restack.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1452 423420c4-83ab-492f-b58f-81f9feb106b5
2008-03-14 07:39:38 +00:00
Peter Åstrand
8524a3fcf2 Applied patch:
[ 1715358 ] seamlessrdp window close


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1446 423420c4-83ab-492f-b58f-81f9feb106b5
2008-03-07 11:27:12 +00:00
Peter Åstrand
6718610779 Applied rdesktop part of patch:
[ 1715359 ] seamlessrdp topmost windows


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1442 423420c4-83ab-492f-b58f-81f9feb106b5
2008-03-06 15:39:21 +00:00
Jay Sorg
5d1527d1b6 32 bit color
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1416 423420c4-83ab-492f-b58f-81f9feb106b5
2007-08-30 04:47:36 +00:00
Pierre Ossman
81a75745cb Implement support for icons in SeamlessRDP.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1412 423420c4-83ab-492f-b58f-81f9feb106b5
2007-06-18 12:00:34 +00:00
Peter Åstrand
a5f6c266ef Send physical mouse buttons over RDP rather than logical ones. Fixes bug 1693905. Patch from Ilya Konstantinov (slightly modified)
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1406 423420c4-83ab-492f-b58f-81f9feb106b5
2007-05-14 12:11:15 +00:00
Michael Gernoth
8db4aee33e [PATCH] rdesktop segfault with libx11-6 1.0.3-7 by Mark Heily <mark@heily.com>
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1402 423420c4-83ab-492f-b58f-81f9feb106b5
2007-04-12 16:04:25 +00:00
Peter Åstrand
96bb96d143 Call ewmh_set_wm_name for main window as well, not just SeamlessRDP windows. This allows specifying an UTF-8 title with the -T argument.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1379 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-17 07:39:31 +00:00
Jay Sorg
6091381a81 prefix BOOL with RD_
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1371 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-08 04:47:06 +00:00
Michael Gernoth
34897ba70a allow inclusion of Xproto.h by renaming their BOOL to XPROTO_BOOL
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1369 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 23:38:35 +00:00
Jay Sorg
797df4fa02 copyright year update
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1364 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 05:39:39 +00:00
Jay Sorg
b670bdacfa RD_ prefix and win32 compatibility for core files
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1363 423420c4-83ab-492f-b58f-81f9feb106b5
2007-01-04 04:55:56 +00:00
Pierre Ossman
c6712a8945 Abstract select() handling in rdpsnd so that backends can do their thing
more correctly.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1345 423420c4-83ab-492f-b58f-81f9feb106b5
2006-12-07 15:23:45 +00:00
Peter Åstrand
6ac7e0a1be Prevent segfaults in out of memory conditions by checking the pointer returned from XGetImage.
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1305 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-27 12:59:38 +00:00
Pierre Ossman
22d88645ff Rewrite the queue management a bit so that blocks are not completed until
they have finished playing. This also makes the queue system mandatory for
all backends.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1301 423420c4-83ab-492f-b58f-81f9feb106b5
2006-10-26 09:47:17 +00:00
Michael Gernoth
07b5b9e41c allow multiple sound-drivers to be compiled in simultaneously and
make the runtime selectable


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1254 423420c4-83ab-492f-b58f-81f9feb106b5
2006-09-17 11:04:50 +00:00
Peter Åstrand
07fa6f71a9 Indent fixes
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1249 423420c4-83ab-492f-b58f-81f9feb106b5
2006-08-07 11:46:28 +00:00
Peter Åstrand
4fd604b015 Fixed a minor seamless bug in DRAW_ELLIPSE: Was copying from
backingstore before updated.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1248 423420c4-83ab-492f-b58f-81f9feb106b5
2006-08-07 11:45:06 +00:00
Michael Gernoth
5f86a9b86a set screen-number in XGetVisualInfo (patch 1417414 by Jeremy Smith)
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1245 423420c4-83ab-492f-b58f-81f9feb106b5
2006-07-11 17:22:24 +00:00
Pierre Ossman
f8b9095263 Add a destroy group command to SeamlessRDP for when entire groups of windows
get killed off in one go.


git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@1231 423420c4-83ab-492f-b58f-81f9feb106b5
2006-04-28 07:55:36 +00:00