Commit graph

16 commits

Author SHA1 Message Date
Philipp Zabel dbe5b53766 backend-rdp: add pixel format info array
Store pixel formats on the backend and stop open coding Pixman format
codes.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
2023-06-15 15:48:26 +00:00
Hideyuki Nagase 70b03b2928 rdp: Add preliminary rdp multihead support
This sets up monitor layout callbacks, and enables input event translation
between the RDP space and the weston desktop. The RDP backend now uses
a heads changed callback instead of the simple head configurator.

We only allow a single monitor for now, but in the future RAIL will make
use of multi-head.

As a side effect, scaling is now supported in RDP sessions.

It should be noted that due to differences between RDP and wayland
representation of their global coordinate spaces, mixing DPI leads to
RDP monitor layouts that can't properly be represented in weston.

Co-authored-by: Steve Pronovost <spronovo@microsoft.com>
Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Steve Pronovost <spronovo@microsoft.com>
Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
2023-01-10 12:12:49 +00:00
Derek Foreman da386c827e rdp: Update to newer FreeRDP release
Update to a newer FreeRDP release so we can start cleaning up
some of our usage of things that will be deprecated in the next
major release.

For this, I've simply picked the newest version currently in
our CI images.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2022-06-09 13:17:03 +00:00
Derek Foreman 2df71c6dd7 rdp: Make thread checks unconfigurable
Instead of a meson option or hidden define, just run these checks always.

It is not Weston's style to add build options for specific asserts, and
currently weston's codebase is expected to always run with asserts
enabled.

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2022-05-24 07:29:45 -05:00
Hideyuki Nagase 297ad403d6 rdp: Add clipboard redirection support
Allow clipboard pasting in and out of an RDP session.

Co-authored-by: Steve Pronovost <spronovo@microsoft.com>
Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Steve Pronovost <spronovo@microsoft.com>
Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
2022-05-19 14:31:59 +00:00
Hideyuki Nagase 252771d9aa rdp: add virtual channel support
RDP exposes certain features (audio, clipboard, RAIL) through a facility
called "virtual channels". Set up the communications framework for using
these.

Co-authored-by: Steve Pronovost <spronovo@microsoft.com>
Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Steve Pronovost <spronovo@microsoft.com>
Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
2022-05-19 14:31:59 +00:00
Hideyuki Nagase 3bdc29b934 rdp: Add cross thread work queues
FreeRDP has some features that start new threads and run
callback functions in them.

We need a way to punt work from these threads back to the
compositor thread.

Co-authored-by: Steve Pronovost <spronovo@microsoft.com>
Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Steve Pronovost <spronovo@microsoft.com>
Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
2022-05-19 14:31:59 +00:00
Hideyuki Nagase 6129cbd880 rdp: Improved rdp logging infrastructure
Add some logging helper functions along with two log scopes for debug
and extremely verbose debugging information.

Also add tangentially related logging for the synchronize event, so
the debug stream isn't empty right now. The vast majority of verbose
usage will come later.

Co-authored-by: Steve Pronovost <spronovo@microsoft.com>
Co-authored-by: Brenton DeGeer <brdegeer@microsoft.com>
Signed-off-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Steve Pronovost <spronovo@microsoft.com>
Signed-off-by: Brenton DeGeer <brdegeer@microsoft.com>
2022-04-21 07:33:27 -05:00
David Fort e3f447eee8 rdp-backend: require FreeRDP >= 2.2 to remove all the version hacks
The stable FreeRDP 2.x branch has been released, so let's rely on that maintained
version and drop all the hacks for older versions. That makes the code and build
cleaner.

Signed-off-by: David Fort <contact@hardening-consulting.com>
2020-10-01 18:15:42 +02:00
Ken C 6b64d39ab7 set SURFACE_BITS_COMMAND cmdType explicitly 2020-05-12 07:30:20 +00:00
Guillaume Champagne 467e6b9883 backend-rdp: enable undefined functions errors.
b_lundef was overriden for the RDP backend since it triggered linking
errors due to functions that were defined in a missing dependency. This
issue was fixed, so the override is removed. The global project's
linker parameters are now applied to the RDP backend.

Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
2020-03-05 14:43:58 +00:00
Guillaume Champagne 7f42b350de backend-rdp: fix unresolved symbols errors
The RDP backend uses functions defined by the Windows Portable Runtime
library (WinPR). The library's code is contained within FreeRDP
repository, but it is packaged as its own library (seperate pkg-config
file).

WinPR is added as a dependency to the RDP backend. The version 2.0 is
choosen as the version to on since the backend depends on FreeRDP 2.0.

Signed-off-by: Guillaume Champagne <champagne.guillaume.c@gmail.com>
2020-03-05 14:43:58 +00:00
Pekka Paalanen d1ace4c97f backend-rdp: work around unresolved symbols
This is preparation for disallowing unresolved symbols project-wide.

This is a temporary fix that should be reverted and fixed properly later.

/usr/bin/ld: libweston/backend-rdp/13a5658@@rdp-backend@sha/rdp.c.o: in function `rdp_peer_context_new':
/home/pq/build/weston-meson/../../git/weston/libweston/backend-rdp/rdp.c:748: undefined reference to `Stream_New'
/usr/bin/ld: libweston/backend-rdp/13a5658@@rdp-backend@sha/rdp.c.o: in function `rdp_peer_context_free':
/home/pq/build/weston-meson/../../git/weston/libweston/backend-rdp/rdp.c:781: undefined reference to `Stream_Free'
/usr/bin/ld: libweston/backend-rdp/13a5658@@rdp-backend@sha/rdp.c.o: in function `xf_input_keyboard_event':
/home/pq/build/weston-meson/../../git/weston/libweston/backend-rdp/rdp.c:1220: undefined reference to `GetVirtualKeyCodeFromVirtualScanCode'
/usr/bin/ld: /home/pq/build/weston-meson/../../git/weston/libweston/backend-rdp/rdp.c:1224: undefined reference to `GetKeycodeFromVirtualKeyCode'
/usr/bin/ld: libweston/backend-rdp/13a5658@@rdp-backend@sha/rdp.c.o: in function `weston_backend_init':
/home/pq/build/weston-meson/../../git/weston/libweston/backend-rdp/rdp.c:1469: undefined reference to `winpr_InitializeSSL'

See also #262

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-10-24 13:40:51 +03:00
Pekka Paalanen 71ff95a544 build: separate deps for int and ext libweston users
We have two kinds of libweston users: internal and external. Weston, the
frontend, counts as an external user, and should not have access to libweston
private headers. The shell plugins are external users as well, because we
intend people to be able to write them. Renderers, backends, and some plugins
are internal users who will need access to private headers.

Create two different Meson dependency objects, one for each kind.

This makes it less likely to accidentally use a private header.

Screen-share is a Weston plugin and therefore counts as an external user, but
it needs the backend API to deliver input. Until we are comfortable exposing
public API for that purpose, let it use internal headers.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-10-24 13:29:33 +03:00
Pekka Paalanen 4f5e360180 build: simplify include_directories
Define common_inc which includes both public_inc and the project root directory.
The project root directory will allow access to config.h and all the shared/
headers.

Replacing all custom '.', '..', '../..', '../shared' etc. include paths with
common_inc reduces clutter in the target definitions and enforces the common
 #include directive style, as e.g. including shared/ headers without the
subdirectory name no longer works.

Unfortunately this does not prevent one from using private libweston headers
with the usual include pattern for public headers.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-10-04 17:14:22 +03:00
Pekka Paalanen b70ee941b5 backend-rdp: move into new subdir
For consistency with other backends.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2019-05-16 13:32:34 +01:00