Commit Graph

16142 Commits

Author SHA1 Message Date
Kang Lin
7e8bb42005 CMAKE: Fix install export FreeRDP-ShadowTargets 2022-09-27 11:06:39 +02:00
Kang Lin
71b48f61c1 WinPR::Clipboard::SyntheticFile: FIX match *.* directory bug. The FilePatternMatchA don't support *.* pattern 2022-09-27 09:27:27 +02:00
Armin Novak
ba2e5477d1 Added additional checks and fixed WCHAR usage. 2022-09-26 14:01:20 +02:00
Kang Lin
195b98a9a9 WinPR::Clipboard: Refactor synthetic file
rename posix.c to synthetic_file.c
2022-09-26 14:01:20 +02:00
akallabeth
4a71cab2e7
Replaced custom coordinate macros with windows ones (#8247)
GET_X_LPARAM and GET_Y_LPARAM correctly extract the mouse x/y
coordinates from lParam
2022-09-26 12:11:50 +02:00
David Fort
e944d8d243 winpr: improve WaitForSingleObject and WaitForMultipleObject with processes
This patch improves waiting on process handles:
* under linux we take advantage of pidfd if available, when it can be used it
allows to have one or more process in the objects that are WaitForMultipleObject-ed.
* the patch also make the code honor the timeout parameter during a WaitForSingleObject and
possibly run completion when WaitForSingleObjectEx is executed with alertable set to true
2022-09-26 12:08:00 +02:00
akallabeth
d2ab631c40
Test uri fix (#8232)
* Fixed TestUri unit test

* Make proper unit test out of the test function
* Add proper test cases

* Replace FindFirstFileA with FindFirstFileW for addins

This allows addin paths to contain unicode symbols.

* Fixed parse_uri_to_local_file definition

* Move to common clipboard.c file
* Move to header file so it can be included in test case

* Added WINPR_LOCAL for test builds

This macro exports internal functions in case of a unit test build
This way unit tests can access these without other workarounds.

* Fixed typo in function name is_dos_driver

* Cleaned up FindFirstFileW call

Use a wrapper function to convert to unicode and call the function

* Cleaned up BUILD_TESTING and EXPORT_ALL_SYMBOLS

* EXPORT_ALL_SYMBOLS now does as the name implies and exports all
  non static functions/variables from the library.
* BUILD_TESTING now only sets the defines for test code and
  activates EXPORT_ALL_SYMBOLS to allow tests to access internal
  code

* Fixed windows client warnings

* disable CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS
2022-09-26 11:22:02 +02:00
David Fort
ccffa8dfa2 winpr: add a function to export timer file descriptor
The equivalent exist for Events, and it happens that sometime you also need to access
the internal file descriptor associated with a timer.
2022-09-23 09:04:45 +02:00
James Fu
a04021d38b Send resize on window state change 2022-09-22 13:48:24 +02:00
akallabeth
b18ca128c8
Fixed missing encomsp check (#8238)
The channel might not have been initialized and the pointer NULL
2022-09-22 10:27:52 +02:00
Armin Novak
e6573ce60f Enable PKCS11 2022-09-22 09:56:56 +02:00
Armin Novak
fa71fcae34 Install required flathub remote and sdk automatically 2022-09-22 09:56:56 +02:00
Armin Novak
fc887196e5 Add flatpak bundle build script
* Builds the flatpak manifest (uses a temporary directory for
  intermediate files)
* Bundles the flatpak and writes it to the current directory
2022-09-22 09:56:56 +02:00
Armin Novak
16cdbf833f Updated flatpak manifest
* Use current dependencies
* Bundle OpenSSL 1.1.1 for windows  XP/vista/xp compatibility
* Build currently checked out FreeRDP instead of origin/master
2022-09-22 09:56:56 +02:00
David Fort
56204164fe core: check the kind of object for events and threads functions
This patch adds some checks for the type of object in Event and Thread functions,
this may help to find bugs where a handle with the wrong type is used as argument
of these functions.
2022-09-21 16:04:02 +02:00
David Fort
e266784b24 client: fix channel loading for rdp2tcp
The RDP2Tcp channel has no associated bool in settings for configuring the loading
of the channel (only settings->RDP2TCPArgs for the args), so let's load it outside
of the big loading loop (prevent a warning for unknown bool setting 1519).
2022-09-21 16:04:02 +02:00
garbb
24fc77a073 fix mouse button "stuck" down when dragged out of window
If user presses mouse button down within window and then moves it
outside of window before releasing, host will still see mouse
button as "stuck down" because mouse up event is not sent. So use
`SetCapture()`/`ReleaseCapture()` to capture mouse events until
button is released.
Also, since coordinates from WM_* events are signed values,
need to prevent negative values from being sent.
2022-09-21 09:59:22 +02:00
Zopolis4
2145cef543 Restrict overmatching MACH ifdef to only trigger on OSX and Mach 2022-09-21 09:09:16 +02:00
David Fort
ee9c9e7c48 Remove duplicated definitions for file constants 2022-09-21 09:03:45 +02:00
David Fort
3dcc4f4024 fix build for mingw-clang 2022-09-21 09:03:45 +02:00
Armin Novak
21ccb75812 Replaced magic numbers with definitions 2022-09-20 15:52:14 +02:00
Armin Novak
a8d4c3397c Fixed passing enum to pointer type 2022-09-20 15:52:14 +02:00
Armin Novak
eaaeb62f05 Fixed -Wcomma warning 2022-09-20 15:52:14 +02:00
Armin Novak
c018632870 Cleaned up android input event processing
* Unified event cleanup code
* Add proper support for unicode input
* Add proper return code for event process failures
2022-09-20 15:52:14 +02:00
Armin Novak
a72f101739 Fixed undefined shift behaviour
BOOL must be cast to UINT32 before shifting to avoid undefined
behaviour
2022-09-20 13:25:44 +02:00
Armin Novak
ee6317081b Improve string version extraction regex
Allow (git) tags of format 'some-important-text_v1.2.3-something_else'
Any character is now allowed, as long as there is a version of format
1.2.3 somewhere in the tag name.
2022-09-20 13:25:44 +02:00
Simon Nivault
82b58325a3 Add switch to declare printer as default or not 2022-09-20 13:25:05 +02:00
Simon Nivault
8d97215881 Enable auto default printer detection only for enum printer 2022-09-20 13:25:05 +02:00
2fly2
7e8986325c fix can not copy file after last copy
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-20 11:56:35 +02:00
2fly2
afd28494a2 fix copy 0 size file on windows
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-20 11:56:35 +02:00
2fly2
880a82e97b fix connection abort when copy from remote wordpad, local windows 10, open local clipboard history in settings
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-09-19 14:13:08 +02:00
Armin Novak
e7973d15ff Fix out of bounds reads in parse_uri_to_local_file 2022-09-19 11:06:40 +02:00
garbb
940317282c remember participantId for use with assistance set control request 2022-09-19 09:41:45 +02:00
Kang Lin
6a6e3340c7 WinPR::Clipboard: Add to convert uri to local file
URI is specified by RFC 8089: https://datatracker.ietf.org/doc/html/rfc8089

Local files:

   o  A traditional file URI for a local file with an empty authority.
      For example:

      *  "file:///path/to/file"

   o  The minimal representation of a local file with no authority field
      and an absolute path that begins with a slash "/".  For example:

      *  "file:/path/to/file"

   o  The minimal representation of a local file in a DOS- or Windows-
      based environment with no authority field and an absolute path
      that begins with a drive letter.  For example:

      *  "file:c:/path/to/file"

   o  Regular DOS or Windows file URIs with vertical line characters in
      the drive letter construct.  For example:

      *  "file:///c|/path/to/file"

      *  "file:/c|/path/to/file"

      *  "file:c|/path/to/file"
2022-09-16 11:41:43 +02:00
garbb
22bd0a43e6 add windows client assistance request control menu item 2022-09-16 08:47:06 +02:00
Armin Novak
09275bf4c7 Disable execinfo support if only header detected
Some implementations (e.g. Android with API < 33) provide the
execinfo.h header file, but do not define the backtrace functions
expected. Disable the support for execinfo backtrace in such a case
2022-09-16 08:43:19 +02:00
garbb
488b52405a change to c style comment 2022-09-15 10:25:35 +02:00
garbb
0413dfe7df if /auto-request-control, only request control once upon connect
if auto-request-control setting is enabled then only request control once upon connect, otherwise it will auto request control again every time server turns off control which is a bit annoying.
2022-09-15 10:25:35 +02:00
Néfix Estrada
66bef0c708 feat(emscripten): add support for emscripten compilation 2022-09-15 10:23:43 +02:00
akallabeth
43dc14f94b
Fix possible out of bound write in winpr_read_unix_timezone_identifier_from_file (#8207)
If the timezone can not be read from the file (read 0 bytes) then memory
at a random position (buffer[-1] = '\0') will be set to zero.
2022-09-14 16:26:24 +02:00
David Fort
1905524442
Channel loading (#8204)
* update .gitignore and cleanup conditionnal callback call

* client: rework channel loading

Automate the loading of channels that only depend on a given enabled setting.
2022-09-14 13:53:27 +02:00
Armin Novak
98f9c7e04b Fix #8176: Check fullscreen state and not setting
Timer based dynamic resolution updates are disabled in fullscreen
state. Check current value and not (permanent) setting
2022-09-14 08:51:54 +02:00
Armin Novak
8561b08592 Fixed gnome and mate clipboard format synthesizers 2022-09-13 14:42:33 +02:00
Armin Novak
cb5992f244 Fix #8186: AVCodec split version defines in two files... 2022-09-13 12:47:13 +02:00
garbb
e06ac251d5
[windows] Disable input events on focus loss (#8199) 2022-09-13 09:34:15 +02:00
garbb
383ecc3cbd fix graphics glitch on toggle smart-sizing 2022-09-13 09:23:32 +02:00
Armin Novak
707b9348ee Unify encomsp request control code 2022-09-13 09:22:41 +02:00
Armin Novak
320bda4a05 Fixed #8084: rdpei thread alive condition was FALSE 2022-09-13 09:16:55 +02:00
Armin Novak
b3f70b047d Fix OId compare 2022-09-13 09:16:55 +02:00
garbb
8d00137cad Update wf_channels.c 2022-09-12 12:58:28 +02:00