206 Commits

Author SHA1 Message Date
Armin Novak
4ff57b68c2 [client,x11] refactor locking
X11 and railWindows lock must be held at the same time to avoid
deadlocking.
2026-03-01 09:23:42 +01:00
Armin Novak
78fd7f580d [client,x11] improve rails window locking
* Add unified lock/unlock functions to allow easier tracing
* Fix a few locking issues found during debugging
* Add an assertion triggering when a lock is locked/unlocked twice
2026-02-27 10:56:12 +01:00
Armin Novak
465a6353d5 [c23,client] replace NULL with nullptr 2026-02-26 15:42:59 +01:00
Armin Novak
48267edf2f [winpr] add WINPR_C_ARRAY_INIT
since C23 allows c++ style initializing replace direct use with this
macro
2026-02-25 19:23:08 +01:00
Armin Novak
df64d00a97 [warnings,api] fix -Wunused-result
With marking publid API [[nodiscard]] some problematic error checks in
the core library were uncovered. This commit addresses these
shortcomings.
2026-02-17 11:07:08 +01:00
Armin Novak
f4b0549c5b [client,warnings] properly handle function return 2026-02-16 09:18:38 +01:00
Armin Novak
1994e98442 [client,x11] lock appWindow
When using xf_rail_get_window lock the hash talbe until xf_rail_return_window
2026-02-09 18:30:11 +01:00
Armin Novak
b4f0f0a18f [client,x11] fix xf_rail_window_common cleanup
leave the appWindow for later cleanup.
2026-02-09 15:50:19 +01:00
Armin Novak
9362a0bf8d [client,x11] stringfiy functions for RAILS 2026-02-09 13:39:28 +01:00
Armin Novak
7a682978cf [clang,warnings] fix Wjump-misses-init 2026-01-08 11:32:35 +01:00
akallabeth
2cf9ceba66 [client,x11] disable output during rail/desktop switch 2025-09-16 16:49:41 +02:00
akallabeth
7e5a76b62b [client,x11] fix rails to desktop mode switch
This allows displaying the dialog when a connection needs confirmation
(e.g. another session already connected)
2025-09-16 16:32:37 +02:00
akallabeth
84e5466f67 [client,x11] fix rails/desktop switch
* Add TODO log entries for (non)monitored desktop messages
* Enable/disable RAILS mode according to these messages
2025-09-16 11:41:58 +02:00
akallabeth
c3e507a82e [winpr,wlog] Replace WLog_PrintMessage calls
Prefer WLog_PrintTextMessage to have proper format string checks in
place.
2025-08-13 15:08:01 +02:00
akallabeth
ff5aca1b0b [client,x11] add more logging X11 calls 2025-05-23 12:15:09 +02:00
akallabeth
1b1a7d35ec [client,x11] log XFlush 2025-05-22 19:47:41 +02:00
Armin Novak
0a0248ebe2 [client,x11] rename _NET_* variables and defines
avoid using restricted _
2025-03-19 18:59:56 +01:00
akallabeth
8db537a07c [client,warnings] fix -Wunused-parameter for x11 2025-02-13 15:54:10 +01:00
akallabeth
00e61074b2 [unused] eliminate unused functions 2025-02-10 09:32:19 +01:00
akallabeth
ba424d7600 [client,x11] fix coordinate sign type 2025-01-14 22:05:52 +01:00
akallabeth
6701359cc1 [warnings] fix integer casting
* use WINPR_ASSERTING_INT_CAST where possible
* clean up client code
2024-12-19 12:45:23 +01:00
akallabeth
141dc8b830 [client,x11] fix some rail z-ordering issues
- Always call xf_XSetTransientForHint unless style has WS_CHILD set.
  xf_XSetTransientForHint in turn checks if a parent is set, which is
  basically the only hint we have for managing/forcing the z-order.
  Everything else is irrelevant in that regard (except WS_EX_TOPMOST)
  See https://learn.microsoft.com/en-us/windows/win32/winmsg/window-features#owned-windows
- Make _NET_WM_STATE_ABOVE only dependent on WS_EX_TOPMOST
2024-12-05 11:22:23 +01:00
akallabeth
78acedb40e [warnigns] fix Wshorten-64-to-32 2024-11-11 10:22:37 +01:00
akallabeth
dcf5a8e28c [warnings] fix -Wswitch-default 2024-10-31 11:42:24 +01:00
akallabeth
0a24f12281 [client,X11] update window style
* if WINDOW_ORDER_STATE_NEW is not set also update
2024-09-20 11:31:34 +02:00
akallabeth
c8e6b1b71f [client,x11] log rail WINDOW_STATE_ORDER 2024-09-20 11:31:30 +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
d7ebec5a65 [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +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
4e438d1c3e [client] make settings opaque 2023-11-24 14:54:56 +01: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
Armin Novak
684558d6d7 [client,x11] wrap XChangeProperty
to debug bug reports occuring only with certain setups wrap the function
call with a logging edition so we have the arguments available in the
log for debugging.
2023-03-07 07:51:52 +01:00
akallabeth
d4808dd3e1 Fixed various compiler 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
1bc110518d [x11,rail] cleaned up rail drawing code
The remote application drawing code was simplified
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
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
697e020abd [rail] Added window update from surface 2022-11-11 06:42:45 +01: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
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
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth
bbf3b8deba Cleaned up xf_AppWindowFromX11Window use 2022-05-19 11:23:43 +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
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
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
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
538b34c51d Moved rail application start to client common 2022-02-22 16:43:21 +01:00
akallabeth
700d6dcd9e Use client/common mouse functions 2022-02-22 09:44:13 +01:00