Commit Graph

1829 Commits

Author SHA1 Message Date
akallabeth adce7378c3 [core,cache] make protocol caches private
most protocol internal caches do not need to be exposed. this reduces
the public API and allows us to more easily improve/change this during a
release cycle
2023-02-27 17:31:52 +01:00
Armin Novak f357312584 [utils] term signal cleanup handlers
add functions to register/unregister termination cleanup handlers
2023-02-23 20:28:15 +01:00
Armin Novak 64efb7ecfd [client,x11] fail build on manpage generation
if manpages should be build but dependencies are missing fail the build
2023-02-23 20:28:15 +01:00
Armin Novak 078162616d [client,x11] split clipboard formats
* a format to request
* a local format to convert to
* add logging
2023-02-23 20:28:15 +01:00
Armin Novak b8a709ccda [client,x11] fixed file clipboard cache
if files are pasted in different file-browser (or e.g. xclip is used)
the data was retrieved in wrong format.
2023-02-21 16:42:54 +01:00
Armin Novak 1522b5aa91 xx 2023-02-21 16:42:54 +01:00
Armin Novak fe3de9b9bf [client,x11] log fuse_session_loop errors 2023-02-21 16:42:54 +01:00
Armin Novak 68d3bcb99a [clipboard] remove linux specifics from channels/cliprdr.h 2023-02-21 16:42:54 +01:00
Armin Novak 10bf44c112 [client,x11] use fuse_root_id 2023-02-21 16:42:54 +01:00
Armin Novak ded270e167 [client,x11] fix fuse file list reset 2023-02-21 16:42:54 +01:00
Armin Novak 9b174c50c9 [client,x11] add fuse debug messages 2023-02-21 16:42:54 +01:00
Armin Novak d694733106 [client,x11] fix fuse detection and use 2023-02-21 16:42:54 +01:00
Armin Novak 5d97a03bf4 [client] auto intialize callbacks
initialize all message/user query callbacks with client_cli_*
2023-02-15 13:34:18 +01:00
akallabeth ff3c7c82ee [client,x11] fix /gdi:hw drawing. 2023-02-14 09:30:45 +01:00
Armin Novak 641022b795 [logging] remove __FUNCTION__ from actual message
prefer the log formatter to provide that information.
2023-01-25 16:26:39 +01:00
Armin Novak 070353bf90 added SDL2 client 2023-01-10 17:38:00 +01:00
Armin Novak d66b165b8e [client,common] common touch handling 2023-01-10 17:38:00 +01:00
Armin Novak d978a0dbdb [client,x11] fix rail checks
rail might be deactivated during connect, so ensure that the default
session rendering path properly checks the window pointer
2023-01-10 11:49:02 +01:00
Armin Novak 2b49047c34 [client] Fix keyboard input
properly pass key repeat events to the server.
2022-12-13 14:37:05 +01:00
Armin Novak d90aa5d6f5 [client,x11] Fixed #8099: Detect key autorepeat
When a key is pressed in autorepeat mode, skip the KeyRelease events in
between.
2022-12-13 14:37:05 +01:00
akallabeth d4808dd3e1 Fixed various compiler warnings 2022-12-09 15:58:26 +01:00
Armin Novak bd7e2263ad fixed const and type cast warnings 2022-12-09 15:58:26 +01:00
akallabeth f553d453b8 [client,x11] use HashTable_ForEach for rail paint 2022-12-09 12:30:14 +01:00
Armin Novak ef5f51ba04 [x11,client] remove dead initialization code 2022-12-09 12:30:14 +01:00
Armin Novak 1bc110518d [x11,rail] cleaned up rail drawing code
The remote application drawing code was simplified
2022-12-09 12:30:14 +01:00
Armin Novak 4008033065 [x11,client] assert use of xfc->depth
Do not use color depth settings before they are initialized
2022-12-09 12:30:14 +01:00
Armin Novak eda1359f52 [x11,client] clean up color depth initialization
* Do not use transparency except in remote application mode.
* Fall back to default color depth in rail mode if no transparency
  supported
2022-12-09 12:30:14 +01:00
Armin Novak 22d5394993 [x11,client] unified drawing path
Do not distinguish between rail and desktop sessions when drawing
2022-12-09 12:30:14 +01:00
Armin Novak 96243c1d17 [x11,client] unify modifier map update/free 2022-12-09 12:30:14 +01:00
akallabeth 4d885e3a6e [client,x11] Initialize window with 32bit color
Allow alpha channel to be properly processed for rail
2022-12-09 12:30:14 +01:00
akallabeth 7b6023b340 [client,x11] move X11 init to post connect 2022-12-09 12:30:14 +01:00
akallabeth cb5c98aab0 [core,client] Add PostFinalDisconnect callback
To have more fine granied control add a new callback.
Now you have the following callback pairs:
* PreConnect <--> PostFinalDisconnect
* PostConnect <--> PostDisconnect
2022-12-09 12:30:14 +01:00
Armin Novak 9218a404b5 [client,x11] force initial format list 2022-12-03 10:53:18 +01:00
akallabeth 5799fb2018 Replace ConvertFromUnicode and ConvertToUnicode
* Use new ConvertUtf8ToWChar, ConvertUtf8NToWChar,
  ConvertUtf8ToWCharAlloc and ConvertUtf8NToWCharAlloc
* Use new ConvertWCharToUtf8, ConvertWCharNToUtf8,
  ConvertWCharToUtf8Alloc and ConvertWCharNToUtf8Alloc
* Use new Stream UTF16 to/from UTF8 read/write functions
* Use new settings UTF16 to/from UTF8 read/write functions
2022-11-28 10:42:36 +01:00
Armin Novak b6b05e93a4 [xfreerdp] fix sending monitor layout PDU
only send it if there are more monitors available.
2022-11-22 15:30:31 +01:00
Armin Novak a489c69f10 [client,x11] Fixed #8397: Clamp scaled cursor sizes
If a cursor is scaled, ensure the result size is at least 1x1 pixel
wide.
2022-11-16 13:47:02 +01:00
akallabeth 33827cb920 Updated RDP state machine
* More detailed states
* Better transition checks
* No more recursive calling of state machine functions
2022-11-11 11:51:27 +01:00
Armin Novak 697e020abd [rail] Added window update from surface 2022-11-11 06:42:45 +01:00
Armin Novak 325c03501e [gfx] Added new UpdateWindowFromSurface callback
* Adds a new callback and settings in gdiGfxSurface to allow updating
  a window directly from surface bitmap data
* Adds new BOOL in gdiGfxSurface windowMapped and
  handleInUpdateSurfaceArea to control where surface data update is
  being handled
2022-11-11 06:42:45 +01:00
akallabeth 3023057b16 Cleaned up some loop code in xf_monitor
Use loop variables to make it more readable
2022-11-04 14:46:58 +01:00
akallabeth c0193a1813 Fixed #8259: in remote app mode keep the keyboard state
If the mouse enters/leaves the window or the window is unmapped in
desktop session mode we can reset the keyboard modifiers state
while in remote app mode these events have different meaning. Be
more strict in the latter case and only reset on focus out
2022-11-03 11:01:30 +01:00
Armin Novak 119b8d4474 Unified command line options to list something
There are various options to list smartcards, monitors, keyboard
settings. Unify them all under a single /list:<something> option
2022-10-19 20:31:53 +02:00
fifthdegree 9d0beaccae smartcardlogon: choose a single smartcard to use
Require a single smartcard certificate to be chosen and define a
callback to choose when more than one is available.
2022-10-19 18:55:38 +02:00
xiaopengzhou@hotmail.com 34afe6b23e Fix Format List PDU is not sent when the Clipboard Redirection Virtual Channel is initialized for the second time. (X11 client) 2022-10-18 09:14:21 +02:00
akallabeth 43c5289928 Replaced memset/ZeroMemory with initializer
* Addes WINPR_ASSERT on many occations
* Replaced memset with array initializer
* Replaced ZeroMemory with array initializer
2022-10-14 12:11:01 +02:00
akallabeth bd4b261a88 Fixed #8296: Assert floatbar->handle and not xfc->window 2022-10-12 21:44:27 +02:00
akallabeth 796ceb2783 Fixed #8269: Ignore mouse/input events during floatbar events 2022-10-07 11:26:56 +02:00
akallabeth 98f9a4da19 Clean up use of memset 2022-10-07 11:26:56 +02:00
akallabeth 8671339b12 Added assertions to floatbar 2022-10-07 11:26:56 +02:00
akallabeth 60720e7706 Improved streamdump file format 2022-10-07 10:38:03 +02:00
akallabeth 1849632c43
Fixed format strings to match arguments (#8254)
* Fixed format strings to match arguments

Reviewed and replaced all %d specifiers to match proper type

* Added proxy dynamic channel command type to log messages.
2022-09-29 14:55:27 +02:00
James Fu a04021d38b Send resize on window state change 2022-09-22 13:48:24 +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 707b9348ee Unify encomsp request control code 2022-09-13 09:22:41 +02:00
Martin Fleisz d8ac6e978e x11: Fix disconnects if WITH_XCURSOR is set to OFF
Fix disconnects if WITH_XCURSOR is set to OFF. In that case xf_Pointer_New currently returns FALSE causing a disconnect.
2022-09-05 14:12:47 +02:00
David Fort 4fc7a9417d
Various fixes / improvements (#8146)
* xfreerdp: fix typo in logs

* winpr: file appender, small code cleanup

* shadow-server: add an option for TLS secrets

This allows to dissect connections to the shadow server.
2022-08-22 09:42:15 +02:00
2fly2 8dfadc5885
fix moving a window shrinks it 14x7 when connect to server 2019 (#8083)
* fix moving a window shrinks it 14x7 when connect to server 2019

Signed-off-by: 2fly2 <wjatchd@163.com>

* use clang-format to apply correct formatting

Signed-off-by: 2fly2 <wjatchd@163.com>

Signed-off-by: 2fly2 <wjatchd@163.com>
2022-08-16 14:22:03 +02:00
Jianfeng Liu 899424e941
xf_floatbar use XmbDrawString instead of XDrawString (#8127)
* xf_floatbar use XmbDrawString instead of XDrawString

* xf_floatbar fall back to XDrawString when fontSet is NULL

Co-authored-by: Jianfeng Liu <jfliu@zshield.net>
2022-08-16 14:21:06 +02:00
zengguang e3cfe7300c
Fixed app windows destroy will do close(0) (#8073)
shmid was not initailized on creation of app window, that will be close fd = 0. everytimes in app windows destroy (Call xf_DestroyWindow ).
2022-07-15 09:18:45 +02:00
Armin Novak b2df9207e4 Fixed #8054: multimonitor settings 2022-07-07 14:24:07 +00:00
Pascal Nowack 6492a00959 client/X11: Relieve CLIPRDR filename restriction when possible
Microsoft Windows imposes strict filename restrictions on its platform.
As RDP is developed by Microsoft and the RDS in MS Windows is typically
used as remote desktop server for the RDP protocol, these filename
restrictions are also enforced in WinPR, when copy-pasting files over
the clipboard.
However, in some connections no peer on MS Windows is involved and in
these situations, these filename restrictions are just an annoyance.

With a recent API addition in WinPR, it is now possible to override the
callback, where the filename is checked, whether it is valid.
So, use this new API to relieve the filename restriction, when the
connected remote desktop server is not on MS Windows.
2022-07-07 07:45:26 +00:00
akallabeth 2da280b8a1 Fixed compilation warnings 2022-07-04 14:59:21 +02:00
akallabeth 9a2a37786e Refactored clipboard structs 2022-07-04 14:31:08 +02:00
akallabeth c07d240bc8 Updated pointer debug log messages 2022-07-04 14:30:49 +02:00
akallabeth b8f3743e82 Update scaled pointer on FocusIn 2022-07-04 14:30:49 +02:00
akallabeth 2c814138cc Fixed xf_Pointer_GetCursorForCurrentScale check 2022-07-04 14:30:49 +02:00
akallabeth e07233ccef Fixed float comparson 2022-06-29 18:10:33 +02:00
akallabeth 291458d2d5 Cleaned up xfreerdp error code mapping 2022-06-29 09:18:53 +02:00
akallabeth ebf5de1d1d Preset LoadChannels function pointer 2022-06-29 09:18:53 +02:00
akallabeth fbe1075a30 Fixed xfreerdp clipboard resource cleanup 2022-06-23 14:19:50 +02:00
akallabeth bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth de91cec5bf Fixed const warning 2022-06-23 07:45:55 +02:00
akallabeth 90ce22283d Replaced direct settings access with getter/setter 2022-06-23 07:45:55 +02:00
akallabeth 650a275ceb Added new client callback LoadChannels and freerdp_client_load_channels
Split channel loading from PreConnect as it might be necessary to
reinitialize channels on redirect
2022-06-23 07:45:55 +02:00
Armin Novak 66e73f8b08 Fixed missing static for functions, fixed declaration of FreeRDPAreColorFormatsEqualNoAlpha 2022-06-21 10:28:34 +02:00
akallabeth f25261e271 Unifiy string append functions 2022-06-17 08:41:46 +02:00
akallabeth bbf3b8deba Cleaned up xf_AppWindowFromX11Window use 2022-05-19 11:23:43 +02:00
2fly2 8f831ed324 fix RAIL abort when reconnect
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-05-19 11:23:43 +02:00
David Fort 77413f49b2 winpr: rework alignment functions
_align_XXX functions aren't widely available depending on the C runtime. That causes
problems with mingw where we can easily have some runtime mixes (which lead to mysterious
segfaults most of the time). This patch introduce winpr_aligned_XXX functions that will
either use the function available, or use an emulation layer.
2022-05-12 11:36:01 +02:00
2fly2 e1e2eef4e1 fix moving a window shrinks it 14x7 when connect to server 2019
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-05-07 13:34:27 +02:00
akallabeth 3d9c972d5c
Replace direct rdpSettings access with getter/setter (#7867)
* Replace direct rdpSettings access with getter/setter

* Fixed xf_gdi_update_screen const warning
2022-05-02 10:55:44 +02:00
akallabeth 0422cf9892 Fixed invalid argument types 2022-04-29 14:38:41 +02:00
akallabeth 6bc7f6ca88 Fixed cast-qual warnings 2022-04-28 12:37:19 +02:00
akallabeth 962c5c3ef0 Fixed dead store warnings 2022-04-28 12:37:19 +02:00
akallabeth ec699f6c75 scanbuild fixes 2022-04-28 12:37:19 +02:00
akallabeth 1dcc5a180a Fixed warnings 2022-04-28 11:24:51 +02:00
akallabeth cc3e28f2f1 Fixed -Wdocumentation errors 2022-04-28 11:24:51 +02:00
akallabeth 2dfc1ddb12 Removed obsolete trio 2022-04-28 10:49:09 +02:00
akallabeth d68327ad74 Fixed const correctness of pPointer_Set
Pointer might need to be modified
2022-04-28 09:17:20 +02:00
akallabeth 667b471686 Fixed cast-quality warnings 2022-04-28 09:17:20 +02:00
akallabeth fb90ac280a Refactored color.h
* Remove implementations from header
* Rename functions to be FreeRDP specific
* Add deprecation define for old names
* Fixed missing includes
2022-04-28 08:40:47 +02:00
akallabeth d3e1810473 Follow up to #7832: Add NULL checks 2022-04-27 23:29:44 +02:00
2fly2 56b0ca7b3f fix restore a maximized window when it is minimized
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-04-27 18:15:56 +02:00
2fly2 83aaa4e575 fix x11 black RAIL window when connect to server 2019
Signed-off-by: 2fly2 <wjatchd@163.com>
2022-04-22 10:16:49 +02:00
akallabeth 73cdcdfe09
Logging and parser fixes (#7796)
* Fixed remdesk settings pointer

* Fixed sign warnings in display_write_monitor_layout_pdu

* Use freerdp_abort_connect_context and freerdp_shall_disconnect_context

* Added and updates settings

* info assert/dynamic timezone

* mcs assert/log/flags

* Fixed and added assertions for wStream

* Unified stream length checks

* Added new function to check for lenght and log
* Replace all usages with this new function

* Cleaned up PER, added parser logging

* Cleaned up BER, added parser logging

* log messages

* Modified Stream_CheckAndLogRequiredLengthEx

* Allow custom format and options
* Add Stream_CheckAndLogRequiredLengthExVa for prepared va_list

* Improved Stream_CheckAndLogRequiredLength

* Now have log level adjustable
* Added function equivalents for existing logger
* Added a backtrace in case of a failure is detected

* Fixed public API input checks
2022-04-19 14:29:17 +02:00
Pascal Nowack e68897a694 X11/cliprdr: Clear selection requests, when they become invalid
When a FormatDataRequest by xfreerdp is answered with the
CB_RESPONSE_FAIL flag, then the request was answered, but xfreerdp does
not mark it as answered, by leaving the request as pending.
This results in non-functional copy-paste actions, when copying
something from the server side, after the failed request.
A similar situation can happen, when a new FormatList is received,
while there is a pending FormatDataRequest.

Fix these situations by clearing the pending request, when a form of an
answer, either via CB_RESPONSE_FAIL flag or via new FormatList, is
received.

Fixes: https://github.com/FreeRDP/FreeRDP/issues/7757
2022-03-29 13:39:07 +02:00
akallabeth d22ef1786b Proper use of rdpSettings in client
* Use getter/setter
* Fix uninitialized uses
2022-03-28 15:52:32 +02:00
akallabeth 14568872a9
Instance cleanup (#7738)
* Cleaned up freerdp::autodetect

* Deprecate freerdp::input

* Deprecated freerdp::update

* Deprecated freerdp::settings

* Deprecated freerdp::autodetect

* Removed rdpTransport::settings

* Deprecated freerdp_per::update|settings|autodetect

* Fixed mac client and server compilation

* Fixed windows compilation

* Added deprecation warnings

* Fixed initialization of structs.

* Fixed android build

* Fixed freerdp_client_context_new const correctness

* Fixed checks for android implementation

Replaced checks with assertions where appropriate

* Fixed checks for windows client

Replaced checks with assertions where appropriate

* Fixed proxy client pointer dereference
2022-03-23 13:18:35 +01:00
Kazuki Oikawa 98f9aedd62 Supports 10bit X11 color (BGRX32 only) 2022-03-20 10:05:18 +01:00
Armin Novak 9bf2fde765 Added patch from #4660 @mokyle
do not deactivate rail windows, just keep them always on
2022-03-16 21:40:34 +01:00
Armin Novak 71aac852d6 Remove async-input from clients 2022-03-08 15:37:19 +01:00
akallabeth 3d38d2636c Decreased logging verbosity for INFO level 2022-03-04 09:34:02 +01:00
Armin Novak 4d03d7c0bf Freerdp remove #ifdef HAVE_CONFIG_H 2022-03-03 11:26:48 +01:00
Armin Novak b2ad47a809 Reorganized FreeRDP headers 2022-03-03 11:26:48 +01:00
Armin Novak b46d74806e Removed FreeRDP_ListSmartcards setting
* Directly print smartcard list without intermediate setting
* Centralize the help text, clients do not need to add extra code
2022-02-24 08:52:25 +01:00
David Fort cb351a099d Enable smartcard NLA logon 2022-02-24 08:52:25 +01:00
Armin Novak 538b34c51d Moved rail application start to client common 2022-02-22 16:43:21 +01:00
Armin Novak 1b71bba2a0 Fixed compilation warnings 2022-02-22 11:29:56 +01:00
akallabeth 8b3f9431de Cleanup/code formatting 2022-02-22 09:44:13 +01:00
Armin Novak f03059e718 Extended AINPUT API:
* Each event now has a timestamp
* Relative and absolute events are sent simultaneously
* Added a flag indicating relative events are available
2022-02-22 09:44:13 +01:00
akallabeth e136444f51 Fixed xinput and x11 event priority
* Prefer xinput events over x11 events for mouse input
* Prefer xinput raw events over xinput events:
  * Only use when the mouse is grabbed (events are not bound to a
    specific window but are global)
  * Only use for relative mouse input
2022-02-22 09:44:13 +01:00
akallabeth d4be1717c2 Fixed window check
Ignore mouse events not originating in session window
2022-02-22 09:44:13 +01:00
akallabeth db00082974 Implemented xfreerdp relative mouse input 2022-02-22 09:44:13 +01:00
akallabeth b1a2efde7d Implemented xfreerdp mouse grab 2022-02-22 09:44:13 +01:00
akallabeth 700d6dcd9e Use client/common mouse functions 2022-02-22 09:44:13 +01:00
akallabeth b2b70fcf6d Use common client channel handling 2022-02-22 09:44:13 +01:00
akallabeth cdbfff87ea Unified client stop 2022-02-22 09:44:13 +01:00
akallabeth 7641710f60 Use a client/common context component
* Allows moving common client code from specific client to a
  generic client/common implementation
2022-02-22 09:44:13 +01:00
akallabeth 8cc6582044
Unify struct definitions (#7633)
* Unified enum/struct definitions, fixed include issues

* Fixed mac compilation issues

* Added missing include

* Fixed windows server build warnings

* Fixed VS2010 build issue

* Removed unnecessary library linking

* Fixed ThreadPool WinXP compatibility

* Fixed pr review remarks
2022-02-14 14:59:22 +01:00
Armin Novak 2e17cee5a9 Fixed various warnings. 2022-01-31 15:55:10 +01:00
akallabeth 7dedfbb0b0 Added support for getpwuid_r, replaced duplicate code
* Use GetUserNameExA to get current user name when required.
* Add support for getpwuid_r if available
2022-01-25 15:33:04 +01:00
akallabeth e6e6ed5dbd Cleaned up PubSub
* Callback arguments now const
* Fixed missing includes
2022-01-19 09:24:57 +01:00
Armin Novak 339cdded45 Fixed memory sanitizer warnings 2022-01-11 14:32:18 +01:00
Armin Novak fd5ac4eed0 Cleaned up wnd.h includes 2021-12-23 14:27:12 +01:00
akallabeth 4a4d783d4f
Moved clipboard custom context checks to implementation (#7501) 2021-12-17 13:47:20 +01:00
akallabeth 298d32164c Removed recursive xf_lock_x11 warning 2021-12-16 12:54:53 +01:00
jackyzy823 90b1b3d540 x11: Add size in xf_cliprdr_fuse_getattr resopnse 2021-11-25 12:24:50 +01:00
Armin Novak 41d77cae46 Fixed /video buffer alignment, added assertions 2021-10-18 10:53:05 +02:00
Armin Novak 9444dab58a Renamed global argument struct 2021-10-14 13:04:59 +02:00
Ian Weir aa4c3dfb8a Add exit codes for more errors 2021-10-11 08:27:41 +02:00
Armin Novak b3209fe2b9 Fixed #7326: Ensure proper window size
When leaving fullscreen with enabled smart sizing the window size
did shrink due to first resizing the window, then enabling window
decorations and finally moving to the correct position.
2021-10-05 10:56:33 +02:00
akallabeth 03a9ca80c8
Refactor proxy (#7312)
* Added hidden transport dump and replay options

* Added settings to enable transport dump and replay
* Added check in freerdp_connect to skip authentication on
  dump replay

* Fixed proxy issues

* Proper shutdown handling
* Uninitialized variables
* Skip proxy-client channels, initialize from peer channels and
  config
* Filter static channels like dynamic ones
* Added proxy module filtering from config data (channels, input, ...)

* Removed oboslete proxy decoding related files

* Added defines for RDPECAM channel

* Added proxy config options:

* VideoRedirection
* CameraRedirection

* Fixed duplicate channel free
2021-09-23 14:52:03 +02:00
Hans-Peter Jansen 1d8002f831 Improve fix 2021-09-20 08:13:22 +02:00
Hans-Peter Jansen ab4b99ec2e Fix X11 floatbar: XGetWindowAttributes returns zero on error 2021-09-20 08:13:22 +02:00
akallabeth 41aaafef77 Added unicode input for xfreerdp 2021-09-17 07:21:45 +02:00
akallabeth c762aacb3c Fixed XRRGetMonitors leak in xfreerdp 2021-09-13 11:04:03 +02:00
Armin Novak 673fb46836 Fixed uninitialized warnings 2021-09-10 08:16:25 +02:00
Armin Novak 0fe1e2359e Fixed all reserved-id-macro warnings 2021-09-10 08:16:25 +02:00
Armin Novak b336751861 Fixed AuthenticateEx issues 2021-09-09 08:53:20 +02:00
Armin Novak 520367b2da Fixed smart sizing
Do not limit resolutions when smart sizing is activated
2021-09-09 08:53:20 +02:00
Armin Novak 0f8c52b9ca Fixed const warnings with argument parser 2021-09-09 08:53:20 +02:00
akallabeth a485306c9e
Moved global static variables to context (#7264)
xfreerdp and wlfreerdp used global static variables for multitouch input. Use fields in client context instead.
2021-09-01 09:44:11 +02:00
Armin Novak c073ca8ac8 Use MAXIMUM_WAIT_OBJECTS 2021-08-25 13:41:38 +02:00
Armin Novak 5afa592244 Fixed cast-qual warnings 2021-08-24 11:10:51 +02:00
Armin Novak f515bd4560 Fixed shadowing and type errors 2021-08-24 10:45:57 +02:00
Armin Novak 610396e197 Fixed compilation warnings
Try to get the number of warnings down
2021-08-02 10:28:06 +02:00
Armin Novak 35474abc24 Fixed setting of primary monitor 2021-07-29 15:09:53 +02:00
liuchenghao 8e87e9d6eb Fix that when the window is minimized, click the dock to restore the window, it cannot be restored normally 2021-07-20 12:23:43 +02:00
akallabeth 242f1734ec Fixed dpkg-buildpackage warnings 2021-06-30 11:57:23 +02:00
Ian Weir a2cf4f591e Add exit codes for logon failure and account locked out 2021-06-28 09:18:17 +02:00
Armin Novak 8ef57bf296 Replaced CMAKE_[SOURCE|BINARY]_DIR with PROJECT_[SOURCE|BINARY]_DIR
Thanks @Pollux42 for the hint in #7096
2021-06-22 08:54:18 +02:00
akallabeth b453d5e40e Fixed rdtk, uwac and winpr standalone builds 2021-06-22 08:54:18 +02:00
Armin Novak 390e329807 client: Fixed warnings 2021-06-18 11:32:16 +02:00
akallabeth 8d82adb28a Fixed warnings 2021-06-17 10:35:22 +02:00
Armin Novak ccfe0c129e Removed checks already done by WINPR_ASSERT 2021-06-16 11:46:42 +02:00
Armin Novak 31862e60f9 Added missing return checks 2021-06-16 11:46:42 +02:00
Armin Novak 216f65336e Fixed HashTable and ArrayList use errors 2021-06-16 11:46:42 +02:00
Armin Novak c2bef2bfa9 Fixed return value checks for ArrayList_Append and HashTable_Insert 2021-06-16 11:46:42 +02:00
Armin Novak 924f1bfebd Fixed xfreerdp check against wrong variable 2021-06-16 11:46:42 +02:00
Armin Novak d6c84c28fb Renamed ArrayList_Add to ArrayList_Append
* Do not break API silently
2021-06-16 11:46:42 +02:00
Armin Novak a1c8e4cf85 Refactored ArrayList_Add to conform to other functions 2021-06-16 11:46:42 +02:00
Armin Novak 880c603c26 Renamed HashTable_Add to HashTable_Insert
* Since the changes break HashTable_Add rename it so that it will
  not fail silently
2021-06-16 11:46:42 +02:00
Armin Novak cb642699c8 Modified HashTable API to be opaque
* Reuse wObject function pointers
* Add missing getters/setters
* Clean up return types, const correctness of arguments
2021-06-16 11:46:42 +02:00
Armin Novak d36d94766e Replaced assert with WINPR_ASSERT 2021-06-14 09:37:07 +02:00
akallabeth 6b36c6d417
Replace fopen and path functions with wrappers (#7043)
Functions like fopen, PathFileExists, PathMakePath need to call
the wide character versions on windows for utf-8 support.
2021-05-31 11:42:03 +02:00
Armin Novak 1d53117508 Fixed async-input quit 2021-05-20 15:08:40 +02:00
David Fort 4753c64038 X11: don't instanciate a clipboard implementation when clipboard is disabled 2021-05-12 09:19:55 +02:00
Ondrej Holy 892cbe3261 Fix various memory leaks reported by Coverity
Covscan report contains various memory leak defects which were marked
as important. I have spent some time analyzing them and although they
were marked as important, most of them are in error cases, so probably
nothing serious. Let's fix most of them anyway. The rest are false
positives, or too complicated to fix, or already fixed in master, or
simply I am unsure about them.

Relates: https://github.com/FreeRDP/FreeRDP/issues/6981
2021-04-27 14:25:20 +02:00
akallabeth 9f573a1b40 Fixed #6938: Remote app mode clipboard fix
In remote app mode the _FREERDP_TIMESTAMP_PROPERTY does not work.
Therefore ignore it
2021-04-16 11:18:00 +02:00
Norbert Federa 689cb70da2 client/x11: fix parent window size restrictions
If a parent window id is specified, the "workarea limits" of the
display must not apply.
2021-04-16 10:28:14 +02:00
Armin Novak 1fa0b80f7f Removed nautilus clipboard file hack
This prevents remote to properly paste text
2021-03-10 15:48:58 +01:00
Armin Novak df785f7b77 Refactored X11 clipboard 2021-03-10 15:48:58 +01:00
akallabeth 618227d751 Fix xf_Pointer_SetPosition with smart-sizing 2021-03-08 14:25:59 +01:00
Armin Novak b1ff171413 Fixed #6014: XFCE minimized state 2021-02-25 14:17:39 +01:00
sss 6574fdf6e4 reverted changes from clang-format 2021-02-25 14:05:40 +01:00
Gluzskiy Alexandr bee2e1526d allow to use in single threaded mode
(some client side channels and all server side channels still need to be
ported to new api)

server: build fix, do not disable threads for rfx encoder

cliprdr client channel: implemented support for DisableThreads option
looks like thread does not make sense at all for this channel

do not initialize disabled image codecs (respect settings)

channels: client: rail: added support for DisableThreads setting

changed "BOOL DisableThreads" to "UINT32 ThreadingFlags"
dropped unnecessary apu changes

draft implementation of threading settings aware message handling api
for addins/channels

rail: use new messaging api

fixed memory leak

msgs handlers external api changes (as requested)

msgs_handlers: init fix

fixed memory leak

logic fix

resolved problems appeared after rebase to master, dropped unnecessary
changes

git clang-format origin/master

fixed TestFreeRDPCodecRemoteFX.c

"formatting, run `clang-format` please"

properly use new "rfx_context_new(BOOL, UINT32)" everywhere

passed Threading Flags to "rfx_context_new" where available

in older C standarts veriables declaration must be done before any code

requested changes

clang-format as requested

use broken signatures of standert C functions for m$ s**tos

clang-format

requested changes

requested changes

moved ThreadingFlags to stable api zone

define type for channel msg handler

typo fix

clang-format

build fix

us ThreadingFlags from server settings

git clang-format origin/master

clang-format
2021-02-25 14:05:40 +01:00
Max Roncace bf9bce2c3e Fix /monitor-list flag being ignored on X11/Wayland 2021-02-25 11:47:18 +01:00
Malte Starostik 06219e4ecb X11 client: ignore grab related LeaveNotify events
This fixes click and drag or more generally any press-hold-release combinations
for the primary mouse button.
Without this, click and drag, drag and drop and in, some remote applications
that presumably rely on the full press-release sequence, even button
presses don't always work.
2021-02-23 14:05:11 +01:00
akallabeth 43311130a2 Fixed CodeQL warnings 2021-02-19 11:19:49 +01:00
akallabeth 1dae0552d7 Fixed various warnings 2021-02-16 16:28:57 +01:00
akallabeth 293d7511e9 Fixed #6712: Use window size from settings
The xfc->window might be NULL (remote app, ...)
2021-02-15 09:03:03 +01:00
Martin Fleisz 6b686eb834
Merge pull request #6806 from akallabeth/xfreerdp-twos-complement-wheel-mask
clients: Use the correct wheel rotation value
2021-02-11 12:21:50 +01:00
Pascal Nowack 1087a5e1a6 clients: Use the correct wheel rotation value
For the negative scrolling direction, RDP uses the two's complement,
instead of the positive wheel value with the negative flag.
xfreerdp currently uses the positive wheel value in addition to the
negative flag, which results in a wrong wheel value on the server side
(136 instead of 120).

Fix this, by using the correct wheel rotation value, which is in the
two's complement.
2021-02-11 09:54:03 +01:00
akallabeth d3ed42a799 Fixed #6801: Delay sending of resolution change
Changed the logic of the disp channel to wait for 800ms after a
ConfigureNotify before sending the new resolution.
The problem fixed with this patch is the following:
1.  Resize the window with the mouse
2.  ConfigureNotify triggers a resize notification
3.  The server resizes to the desired resolution
3a. More ConfigureNotify events are generated
4.  The local window resize to the new resolution triggers another
    ConfigureNotify

a. Depending on the timing (sending is already rate limited) the
   events from 3a and 4 will make the size of the window jump
b. Very fast resizing will pick a random resolution from the
   sequence of ConfigureNotify events as the final resolution
2021-02-10 15:38:03 +01:00
Armin Novak 65647d5763 Use separate codec contexts for legacy and GFX 2021-02-10 10:38:24 +01:00
Martin Fleisz 784f445aa1
Merge pull request #6609 from akallabeth/clip_response
Fixed sending of clipboard format request response
2021-02-05 10:18:08 +01:00
Martin Fleisz 21158c0e8b
Merge pull request #6537 from akallabeth/kbd_remap
Added option to remap scancodes
2021-02-05 09:31:45 +01:00
akallabeth a51f4ccaaa Filter out duplicate ClientFormatList announcements 2021-01-25 10:34:11 +01:00
akallabeth 2efb7d9274 Fixed sending of clipboard format request response
If a request was pending and new formats were announced the response
to a ServerFormatDataRequest was never sent.
2021-01-25 10:32:50 +01:00
akallabeth f3dad4106a Fixed support for huge files in clipboard 2021-01-25 08:43:46 +01:00
Ondrej Holy d7566f5f5a
client: Fix exit codes for /help and similar option (#6741)
* client: Fix exit codes for /help and similar option

Currently, non-zero exit code is returned for /version, /buildconfig, /help,
/monitor-list, /kbd-list and /kbd-lang-list command-line options for several
clients. This is against conventions because 0 is usually returned in
such cases. Also, there is potentially another problem that the returned
codes overflow on UNIX systems (where the exit code is a number between 0
and 255). Let's fix the clients to return 0 in the mentioned cases to honor
conventions and 1 for the command-line parsing errors (or -1 for clients
who already use that value).

Fixes: https://github.com/FreeRDP/FreeRDP/issues/6686

* Refactored freerdp_client_settings_command_line_status_print_ex

Now returns 0 if help or version information was requested.

* Do not eliminate original error status.

Co-authored-by: akallabeth <akallabeth@posteo.net>
2021-01-22 09:44:55 +01:00
akallabeth 4ca2090f03 Return ENOENT if fuse_ino_t is not found 2021-01-18 19:13:56 +01:00
Armin Novak 78435c2eea Added missing errno.h include 2021-01-18 19:13:56 +01:00
Armin Novak 72d9b7f7f5 Added add_definitions(-D_FILE_OFFSET_BITS=64) 2021-01-18 19:13:56 +01:00
jackyzy823 b972d70a9e x11: refactor fuse code 2021-01-18 19:13:56 +01:00
jackyzy823 7f043ebb52 x11: update cmake file to build with fuse2/fuse3 or without fuse 2021-01-18 19:13:56 +01:00
jackyzy823 1de1f113ed x11: more error handling for remote to local file copy 2021-01-18 19:13:56 +01:00
jackyzy823 a61c185d30 x11: implement all related code to file content request for size and FD_WRITESTIME flag in response , fix include dir for fuse 2021-01-18 19:13:56 +01:00
jackyzy823 d537988f28 x11: add support for remote to local clipboard file copy 2021-01-18 19:13:56 +01:00