Commit Graph

329 Commits

Author SHA1 Message Date
René Genz
9e99dd52d6 Fix minor spelling mistakes 2017-11-02 01:01:44 +01:00
Joshua Hudson
e7cda3dbf8 add -M for local mouse cursor 2017-11-01 06:47:31 +01:00
Karl Mikaelsson
8f83c1f6c7 Rename suppress output functions to match MS-RDPBCGR
Issue #161
2017-10-30 10:47:21 +01:00
Henrik Andersson
0d707ae103 Fix sign-compare compiler warnings 2017-10-20 13:30:42 +02:00
Henrik Andersson
02a7ec4361 Fixed a few compiler warning, compare sign / unsigned values 2017-10-17 10:27:14 +02:00
Henrik Andersson
797a28ed25 Fix pointer sign warning 2017-10-17 10:20:23 +02:00
Henrik Andersson
f50e17ba9f Fix uninitialized variable warning
This also set a cursor pixelvalue to RED to visually
indicate error while parsing the cursor.
2017-10-17 10:16:07 +02:00
Henrik Andersson
7a81f7eae2 Fix all unused params warnings 2017-10-17 10:07:55 +02:00
Henrik Andersson
31f99755f7 Fix bug were for loop will always run until break is hit.
When 'i' is an unsigned int, it can never become negative and
stop the for loop iterating over the children.
2017-10-17 10:00:22 +02:00
Karl Mikaelsson
b8a1d04ffb Use system default pointer when requested
Solves problem with hidden cursors at login screen (part of
issue #165)

Signed-off-by: Karl Mikaelsson <derfian@cendio.se>
Signed-off-by: Henrik Andersson <hean01@cendio.se>
2017-10-16 13:55:39 +02:00
Alexander Zakharov
f091a38cff Sane way to fix absence of HOST_NAME_MAX on osx 2017-10-05 19:47:50 +03:00
Henrik Andersson
0954ac3ca5 Some cursors are hard to see on dark background
The new cursor rendering code that was added will render
1bpp XOR cursors as plain black cursors. This introduces
a problem were the cursor is not visible on dark backgrounds.
This change adds a white outlined rendering of the shape to
those specific cursors.
2017-09-27 13:49:33 +02:00
Henrik Andersson
04761c66c6 Free image after cursor is created. 2017-09-26 11:13:09 +02:00
Henrik Andersson
550056ab42 Add debug log for ui_set_cursor() 2017-09-26 09:16:43 +02:00
Henrik Andersson
109893c9da Fix type in log message 2017-09-26 09:02:32 +02:00
Henrik Andersson
6dd85edc6f Rewrite cursor code to use Xcursor
This commit enables support for color cursors with alpha,
however this raises the requirement of libXcursor which is
not such a big deal.

Fixes issue #86 and #21
2017-09-21 16:02:56 +02:00
Pierre G. Bogossian
9889ed6457 Support extended mouse buttons 4 and 5 (ie back/forward buttons) 2017-07-09 16:56:30 +02:00
Henrik Andersson
05689dbc99 Fix to reset clipping at reconnect resize
The previous fix for clipping problems was not enough, reverted
that change in xwin.c in favor for adding reset of window clipping
rect at reconnect.

Fix issue #117
2017-05-15 14:57:50 +02:00
Henrik Andersson
2c9a706c23 Fix X error BadAlloc when using seamlessrdp
The introduction of setting session size using percentages of both
with and height of screen like -g 50%x100%, commit 3140824be
introduced a bug when using seamless rdp. This commit fixes this bug.
2017-03-09 12:25:10 +01:00
Henrik Andersson
87d8d123b8 Rework the logging system
This commit will add a logging system to solve the problem that
one actually need to recompile rdesktop from source to enable
different debug logging.

- Same logging api  for all kind of logging and messages to
   end user.

- Adding -v for verbose output when running rdesktop.

- All messages are logged into a subject and with a type, eg:

     logger(Keyboard, Notice, "Autos-electing %s based on locale.", locale);

- Debug logging is enabled trough a environment variable RDEKSTOP_DEBUG,
  which specifies subjects of interest, comma separated. There is a special
  subject named All which includes all subject for debug loggin. There is also
  a simple logic opeartor '!' = NOT which can be used in combination like:

    RDESKTOP_DEBUG=All,!Graphics,!Sound

  Which would give debug log output for All subject except Graphics and Sound.
2017-01-26 14:19:40 +01:00
Henrik Andersson
71bf45a5d7 Ran indent-all script 2017-01-25 00:34:37 +01:00
Henrik Andersson
14a4bf2d1d Use the correct mask for XSendEvent()
Sending ClientMessage is plain wrong.
2017-01-24 23:45:17 +01:00
remijouannet
3140824be3 -g 70%x90% 2016-05-24 17:47:03 +02:00
Henrik Andersson
2a6298ac63 Add support for _NET_WM_PING to be used by Window Managers. 2015-09-15 14:31:16 +02:00
Henrik Andersson
49a67bdfce Add _NET_WM_PID and required WM_CLIENT_MACHINE properties to windows. 2015-09-15 12:38:28 +02:00
Henrik Andersson
c843a3237f Reset clip at window resize. 2015-09-15 09:31:44 +02:00
Henrik Andersson
378b10f296 Make sure to break out of inner loop when pending resize
is triggered. This will make a reconnect happen as fast as
possible and prevent waiting for any xwin inputs or data
on rdp channel.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1846 423420c4-83ab-492f-b58f-81f9feb106b5
2015-02-11 14:33:57 +00:00
Henrik Andersson
46a3684c27 Document the new seamless protocol command PERSISTENT
and implement the usage of the new command in rdesktop.

If a seamless command is specified the persistent mode
of the session will be changed to non-persistent.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1822 423420c4-83ab-492f-b58f-81f9feb106b5
2014-07-03 10:42:04 +00:00
Henrik Andersson
2ceb56e0d4 Added seamless_reset_state() and use it whenever a
new window is created. This fixes issues with seamless
protocol parser between reconnects.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1820 423420c4-83ab-492f-b58f-81f9feb106b5
2014-07-02 08:25:07 +00:00
Henrik Andersson
b4ac3c4182 Clear g_seamless_spawn_cmd when used.
Fixes problem were a new seamless application is spawned
upon a reconnection due to resize or network failure.



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1809 423420c4-83ab-492f-b58f-81f9feb106b5
2014-05-28 07:56:23 +00:00
Peter Åstrand
2ea8e8e5d7 When using SeamlessRDP with broken window managers, we hade a timeout
of 1 second for ConfigureNotify. Lower this to 0.5 seconds. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1747 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-19 14:45:22 +00:00
Peter Åstrand
7945532bfe Similar to SeamlessRDPshell commit 1745. Avoid issues with topmost
("_NET_WM_STATE_ABOVE") windows relating to non-topmost windows. 



git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/rdesktop/trunk@1746 423420c4-83ab-492f-b58f-81f9feb106b5
2013-09-19 14:39:08 +00:00
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