Commit Graph

1848 Commits

Author SHA1 Message Date
Armin Novak d8cabe84ce [client,X11] check PubSub for NULL 2024-05-08 10:08:08 +02:00
toreonify 9118551334 Renamed Atom identifiers, reserved names were used 2024-05-04 11:32:39 +02:00
toreonify 6ea047558e Custom context/popup menus stay on screen
Fix maximized/restored window state
Add support for window allowed actions
2024-05-04 11:32:39 +02:00
akallabeth 0a0df77c39 [build,ipp] drop support for IPP
Intel Performance Primitives do not have a test setup in FreeRDP and
most likely no longer compile.
2024-04-16 12:44:38 +02:00
Armin Novak 405a24c200 [coverity] 1543179 Array compared against 0 2024-04-15 11:30:31 +02:00
akallabeth 2477b37128 [warnings,types] fix BOOL assingments 2024-04-12 09:45:09 +02:00
akallabeth 80c562d040 [coverity] 1543235 Out-of-bounds access 2024-04-11 12:04:07 +02:00
akallabeth 61e0d122b7 [coverity] 1543235 Out-of-bounds access 2024-04-11 12:04:07 +02:00
akallabeth 4b1bdc622a [x11,client] always use current clipboard owner 2024-04-07 08:59:51 +02:00
akallabeth 735cb1ec14 [cmake] fix mingw linking 2024-04-03 09:42:44 +02:00
Mathias Lithen 532a3cd1a9 Set res_class on classHints 2024-04-01 09:30:30 +02:00
sasha0552 d864393a8a [client,X11] fix detection of need to use relative movements
Register XI raw masks when MouseUseRelativeMove enabled
Fix duplication of sent events (in previous implementation relative and absolute events were sent at the same time)
Slightly refactor code
2024-03-26 09:20:50 +01:00
akallabeth 678ff144ab [cmake] unify windows resource file generation
* use a macro to add resource files for executables and shared libraries
* use that macro to declare targets
* use that macro to set library/binary versioning
* use that macro to set target output name
* use a macro to create manpages and names
2024-03-20 11:17:18 +01:00
Armin Novak 56a3955af4 [client,x11] send TS_RAIL_ORDER_ACTIVATE
when a rail window has gained focus or lost it send
TS_RAIL_ORDER_ACTIVATE to inform the server about the change.
2024-03-14 10:11:47 +01:00
akallabeth 6b5f262660 [client,x11] document keyboard shortcuts 2024-03-12 10:13:25 +01:00
akallabeth c87368310a [client,x11] fix right control ungrab
ungrab keybaord/mouse on first right control press. Fixes #9959
2024-03-12 10:13:25 +01:00
akallabeth e53dc3dabb [client,x11] fix X11 access during +auth-only
fixes #9946
2024-03-08 11:13:05 +01:00
akallabeth 9a7d30d174 [clang,tidy] fix a few warnings 2024-02-27 14:15:43 +01:00
akallabeth acedd305d3 fixed unused-but-set-variable warnings 2024-02-22 12:31:50 +01:00
akallabeth 05e555feb7 fixed unused-variable warnings 2024-02-22 12:31:50 +01:00
akallabeth d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
Armin Novak ab3f44921c [client,x11] add alternate bitmap mime types
announce alternate mime types to clipboard
2024-02-22 09:33:59 +01:00
akallabeth b894199f72 [winpr,collections] add generic string clone functions
The ArrayList, HashTable, ... New functions require
void* (*fkt)(const void* ptr) type functions. Provide a generic wrapper
for CHAR and WCHAR strdup to eliminate warnings. Also export a
corresponding free function to avoid issues with runtime
differences.
2024-02-15 11:49:16 +01:00
akallabeth 0e44b2c674 [clang-tidy] clang-analyzer-unix.Malloc 2024-02-15 11:49:16 +01:00
akallabeth f69e1fe697 [clang-tidy] readability-duplicate-include 2024-02-15 11:49:16 +01:00
akallabeth 0ba995655d [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
akallabeth 207def5c56 [clang-tidy] readability-isolate-declaration 2024-02-15 11:49:16 +01:00
akallabeth 2fffcd64b9 [winpr] use winpr_strerror instead of strerror
use the wrapper from WinPR to use the best implementation available.
2024-02-06 15:45:47 +01:00
akallabeth ba8cf8cf21 [build] fix Wmismatched-deallocator warnings
With custom malloc function attributes the fail path in the _New
functions produces warnings due to allocator mismatches. Silence them.
2024-02-05 08:16:55 +01:00
akallabeth bb42d425ed [gcc,clang] add support for attribute(malloc)
Mark all malloc like functions and add their appropriate free function
to let the compiler complain on mismatches
2024-02-02 15:10:40 +01:00
Armin Novak a7decba8c2 [cmake] unify common options 2023-12-22 16:21:30 +01:00
Armin Novak 175a3ca09a [cmake] do not append EXECUTABLE_SUFFIX to OUTPUT_NAME 2023-12-22 15:37:56 +01:00
Armin Novak 7d641a67b9 [doc,manpage] name manpages versioned
if WITH_BINARY_VERSIONING is activated also version the manpages to
match the binary names
2023-12-22 10:24:09 +01:00
Armin Novak b04271ae2d [cmake] add executable versioning
optionally append API version to generated binaries
2023-12-21 18:56:51 +01:00
Armin Novak 7f25a7cebf [cmake] provide default project version
each subproject inherits the project version of the top level project
2023-12-21 18:56:51 +01:00
Armin Novak 000f32d48a [client,x11] rename project to binary 2023-12-20 09:21:31 +01:00
Armin Novak c064d54cb1 [client,sdl] add manpage 2023-12-20 09:21:31 +01:00
Armin Novak 8613613913 [client,common] fix relative mouse event detect
Only send relative mouse events, if the client explicitely enabled them,
the calling function is reporting the events as relative and the server
announced support for it.
2023-12-19 21:26:46 +01:00
David Fort 8d461f40ab [build] fix some warnings 2023-12-19 16:34:41 +01:00
Armin Novak 35697c0292 [client,x11] fix segfault due to wrong print function 2023-12-14 14:05:39 +01:00
Armin Novak 3043fca91d [warnings] fixed -Wdiscarded-qualifiers 2023-12-13 13:24:22 +01:00
Armin Novak 2b1aae0238 [client,x11] fix maximum number of input events 2023-12-07 10:53:34 +01:00
Armin Novak 6f6c0248f0 [client,common] check for relative mouse events
Added freerdp_client_use_relative_mouse_events to tell the client if the
coordinates should be relative or absolute
2023-12-06 10:45:01 +01:00
akallabeth f02375e4ec [client,x11] remove hardware bitmap 2023-12-01 10:18:33 +01:00
akallabeth 99a0a28d77 [client,X11] drop direct glyph mapping 2023-12-01 10:18:33 +01:00
akallabeth 3361116834 [client,x11] drop direct gdi mapping
windows GDI is legacy and can not be properly mapped to X11 equivalents
witout glitches. Drop support for that while preserving XImage/Pixmap
acceleration support.
2023-12-01 10:18:33 +01:00
akallabeth 615fcc4370 [cmake] prevent in source builds 2023-11-28 12:14:55 +01:00
akallabeth 1b31852d32 [git] remove .gitignore
we do no longer allow in source builds, so remove all the .gitignore
files just hiding generated files
2023-11-28 12:14:55 +01:00
akallabeth a9c57b6319 [client,x11] fix settings access warning 2023-11-27 09:35:58 +01:00
akallabeth ed3a1113f5 [client,x11] fix monitor detection 2023-11-27 09:35:58 +01:00
Armin Novak 1e88b2fa37 [client,x11] query correct display 2023-11-27 09:35:58 +01:00
akallabeth 4e438d1c3e [client] make settings opaque 2023-11-24 14:54:56 +01:00
akallabeth 229916d02e [settings] replace XSelectionAtom
the common command line parser should not touch unstable API settings,
so use newly introduced FreeRDP_ClipboardUseSelection
2023-10-19 14:22:19 +02:00
Armin Novak 60390ea40c [pragma] unify compiler diagnostics 2023-10-16 15:10:13 +02:00
akallabeth 5a7a1c159d [casts] remove fnObject* function pointer casts
use proper types that match the function pointer definition to avoid
surprises if the code should be refactored
2023-09-20 21:11:30 +02:00
akallabeth 7fb2f062f0 [client,x11] fix #9410 leak in xf_cliprdr 2023-09-20 21:11:30 +02:00
ichaoX 4935b0978b [client,X11] avoid dynamic allocation of devName 2023-09-13 15:57:59 +02:00
ichaoX a28920f3ed [client,X11] add pen button support 2023-09-13 15:57:59 +02:00
ichaoX becaac792f [client,x11] improved pen type recognition
* improved pen type recognition.
* fix not recognizing other newly connected pen devices when a pen device is already connected.
2023-09-13 15:57:59 +02:00
Armin Novak 3ea38175b4 [locale,keyboard] fix keyboard mapping on apple 2023-08-31 11:39:22 +02:00
akallabeth 9cee9b3c08 [c standard] use WINPR_FALLTHROUGH
use the macro to silence intentional switch fallthrough locations
2023-08-25 12:56:36 +02:00
akallabeth 7a71441476 [warnings] fix integer multiplications
Ensure the integer width for size arguments is 64bit in a
multiplication. Leading 64bit constant 1ull expands width, a trailing
one is ignored.
2023-08-22 11:55:00 +02:00
James Fu 5b012fbc8a rail: fix window freeze when moving window after minimizing and restoring
When restoring from minimized state, sometimes MapNotify is received before PropertyNotify,
and the rail_state is still WINDOW_SHOW_MINIMIZED.
2023-08-21 14:44:58 +02:00
akallabeth 8470b6ea26 [cmake] set default build type
set with CACHE STRING FORCE to properly be picked up by configuration
tools
2023-08-04 12:59:11 +02:00
Kai Pastor 5ecc011c13 Export interface include directories 2023-08-01 11:12:46 +02:00
Armin Novak ef5c0e78ab [build] use define WINPR_FALLTHROUGH
with c17 compatible compilers annotate with [[fallthrough]]
2023-07-31 23:46:53 +02:00
Armin Novak e61880d077 [standard] replace __FUNCTION__ with __func__ 2023-07-27 20:02:43 +02:00
akallabeth 734117351d [aad,avc] unify callbacks to GetAccessToken
The AAD and AVD authentication mechanisms both need an OAuth2 token.
They only differ in the provided arguments, so unify the callbacks into
a single one with variable argument lists.
2023-07-20 14:20:28 +02:00
fifthdegree d309fcd6e8 Restructure Azure AD related stuff
- Move responsibility for obtaining access tokens to clients
- Add function for getting access tokens for AVD
- Get correct server hostname during AVD setup
- Add utility function for doing http requests
2023-07-20 14:20:28 +02:00
Pascal Nowack d7d3055b5f X11/cliprdr: Rework server to client clipboard handling
The purpose of clipboard data locking is to make the other peer
retaining the current file list until a pending paste operation is done,
even though the clipboard selection changed.
As it may be difficult to determine, when a lock is needed, imitate the
same behaviour as mstsc:
When the server side supports clipboard data locking, always attempt to
lock the file list on the server regardless of what is advertised in a
FormatList PDU.
The Lock Clipboard Data PDU can even be already sent, before the
Format List Response PDU is sent.
This is also what mstsc, does: First, lock the new (potential) file
list, then unlock the file list, when the pending paste operation is
done.
So, rework the current clipboard implementation in that direction.

Since the implementation for timeouts for old file lists is a bit hard,
for now always force unlock pending locks, when the selection changes.
However, timeouts for old file lists can still be added in the future.

The reworked clipboard handling is done with the help of three hash
tables:

1. The inode table: This hash table manages all inodes for each file.
   The keys in this table are the inodes themselves, while the values
   the files and directories and their attributes (file size, last write
   time, etc.).
2. The clipdata table: This table manages the locks for each file list.
   The keys in this table represent the clip data id and the values the
   clip data entries, which have a reference to the clip data dir, a
   directory containing the whole selection, and some helper attributes,
   like the clip data id itself.
3. The request table: Every file size or file range request is managed
   here. When a FileContentsRequest is made, its stream id with the
   respective details are added to this table. When a response is
   received, these details can then be easily looked up here.
2023-07-20 11:36:11 +02:00
Armin Novak 7dbf7cec68 [client,x11] fix RAILS image paste, fixes #7276 2023-07-10 10:26:55 +02:00
Armin Novak fe987091f4 [client,x11] add signal cleanup handler for pipe 2023-07-03 13:21:43 +02:00
akallabeth 3dbd9c7eeb [client,x11] fix unicode input
key up and down events were reverted
2023-07-03 13:21:43 +02:00
akallabeth 2d85aa43fa [client,x11] add thread reading from named pipe
the named pipe input is converted to unicode and sent as keyboard input
2023-07-03 13:21:43 +02:00
Armin Novak 8822ad53c1 [client,x11] fix memory leak 2023-07-03 10:19:34 +02:00
akallabeth 9565ff4b29 [client,x11] restrict pointer move to active window 2023-07-03 10:00:29 +02:00
akallabeth 32b60ae438 [pointer] unify mouse pointer settings 2023-07-03 10:00:29 +02:00
Armin Novak 93423eaf11 [client,common] move pen detection to client common 2023-06-26 11:22:32 +02:00
Hodol Han c278170a2a [client,x11] Reinit xinput input event masks on device changes
Reinitialize xinput input event masks to get events from newly plugged
devices after setup. We utilize XI_DeviceChanged and XI_HierarchyChanged
event types to handle device changes.
2023-06-23 08:36:09 +02:00
digitalsignalperson edee918dac remove unused variable, remove comment, add missing return statement 2023-06-21 22:59:53 +02:00
digitalsignalperson 84e1148bf1 Forcing PenHoverCancel allowed the eraser hover icon to apprear consistently after using the eraser, but fast writing with the pen would miss some line segments. Reverting to where it all works, but the hover icon doesn't display eraser correctly most of the time after erasing something 2023-06-21 18:42:38 +02:00
digitalsignalperson 9c7a541d9c Implement pen functionality for X11, including pressure, hover, and eraser 2023-06-21 18:42:38 +02:00
Armin Novak b05eacb99e [build] fixed compilation warnings 2023-06-08 08:13:16 +02:00
Armin Novak 970f0c54e8 [stream] use const correct Stream_Pointer access 2023-06-08 08:09:33 +02:00
Armin Novak a4c6b36a19 [build] fix memory sanitizer stack frame warnings 2023-06-07 09:14:45 +02:00
Armin Novak 3e44efc841 [cmake] use FindX11 from CMake 3.13 2023-05-31 11:05:56 +02:00
akallabeth 28b0821ec6 [cmake] build xfreerdp standalone project 2023-05-31 11:05:56 +02:00
Armin Novak 4545783dff [client,x11] always only send available clipboard 2023-05-30 13:42:28 +02:00
akallabeth 4ee6cfe13a [warnings] fix -Wmissing-prototypes 2023-05-24 08:24:32 +02:00
akallabeth d4fc9d5327 [client,common] auto reconnect abort early on cancel 2023-05-23 08:51:41 +02:00
fifthdegree 449b96adb2 Use popup browser for AAD auth in SDL client
Optionally build the SDL client with Qt WebEngine to create a popup
browser for authentication to AAD. Also change the URL output on the
command line to use the "nativeclient" redirect for easier copy/pasting
of the authorization code.
2023-05-23 06:04:55 +02:00
Pascal Nowack 7fce527cff client/X11: Fix IO errors during server to client file transfer
When receiving a file list, xfreerdp3 rebuilds the content of the FUSE
filesystem.
Since fetching uri-lists can happen during a paste action too, xfreerdp3
caches the content of the last fetched mime type.
However, uri-lists exists in different variations, e.g. nautilus uses a
different mime type, than gnome-terminal does.
Furthermore, FormatLists can also contain other formats in addition to
file lists.
Fetching those contents during a paste operation leads to IO errors in
the paste operation.

In order to fix those errors, cache every mimetype in two hash tables:
One for the raw (unconverted) data, and one for the converted data.
When a content request is received, xfreerdp3 can with the already
cached converted data, directly serve the data.
If the content is not available as cached data, but its source data was
already fetched, use that source data to create the converted data.
Then serve the converted data.
Only if no cached converted data or cached raw data is available, issue
a new FormatDataRequest.
2023-04-17 08:33:53 +02:00
Pascal Nowack d9fe2df6b5 client/X11: Only serve cached data when format matches
Format lists can contain multiple clipboard formats. When the data for
one is requested, xfreerdp caches it.
When the data for a different format in the same format lists is
requested, xfreerdp cannot use the already cached data, since that data
refers to a different format.
As a result, xfreerdp needs to ask for the data of the now requested
format.

However, this is currently not the case. xfreerdp will just provide the
data of the first request after receiving the last format list.
In order to fix this situation, also save the format id of the last
requested format.
If the format id of the cached data matches the one of the current
request, serve the data from the cached data.
Otherwise, issue a new FormatDataRequest.
2023-04-04 09:05:39 +02:00
Pascal Nowack 1f79eaa831 client/X11: Reintroduce handling for relieving filename restriction
Commit 6492a00959 introduced a way to
relieve the filename restriction, which ensured that file lists
containing files with names, that have characters, which are not allowed
on MS Windows.
This relief handling kicked in, when xfreerdp did not connect to MS
Windows RDS.
Commit d521c7fa74 got rid of any
wClipboardDelegate occurrence in xf_cliprdr.c, which also got rid of the
filename restriction relieve handling.
However, the relief handling was not added back, so do it now.
2023-04-04 09:05:39 +02:00
Armin Novak 3f5b44ba36 [clients] fix wClipboard locking 2023-03-22 16:28:01 +01:00
akallabeth a360f1ca8c [build] fix a few compiler warnings 2023-03-13 13:04:45 +01:00
Armin Novak f01aaab35a [client,x11] fix variable shadow 2023-03-07 07:51:52 +01:00
Armin Novak c016562478 [client,x11] enable XSync with debug builds 2023-03-07 07:51:52 +01:00
Armin Novak 8fdd261d25 [client,x11] install X11 error handler
always install a custom X11 error handler to log the issue and location
in code.
2023-03-07 07:51:52 +01:00
Armin Novak 0b048e247e [client,x11] add Safe_XGetAtomName 2023-03-07 07:51:52 +01:00