Commit Graph

154 Commits

Author SHA1 Message Date
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 dd2d110870 [warnings] fix -Wcast-qual 2023-11-24 18:19:03 +01:00
Armin Novak 615604e8f2 [uwac] use posix functions 2023-11-24 18:19:03 +01:00
akallabeth 13b44b8b77 [ifdef] properly check for defined 2023-11-10 09:58:23 +01:00
akallabeth 89429885a0 [cmake] make generated pkg-config files relocatable
* new CMake option PKG_CONFIG_RELOCATABLE (default ON) allows generating
  traditional or relocatable pc files
2023-10-10 19:35:27 +02:00
akallabeth ffb9584e56 fix return value 2023-08-31 11:39:22 +02:00
akallabeth 1b2335873a [uwac] add new callbacks, assert arguments 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
Kimon Hoffmann 8ec4d20616 [cmake] Locate PkgConfig module with find_package() instead of include(FindPkgConfig)
This is the contemporary way of including find modules and including the
find module this way avoids cmake errors in conjunction with
find_package_handle_standard_args().

Signed-off-by: Kimon Hoffmann <Kimon.Hoffmann@lawo.com>
2023-08-21 12:43:56 +02:00
akallabeth 793d80f2c4 [cmake] update ci defaults 2023-08-04 12:59:11 +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
akallabeth 76d23885d4 [cmake] add common options to subprojects 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 e0aec72d71 [pkg-config] unify exec_prefix 2023-04-24 22:01:15 +02:00
Armin Novak f674b209ff [pkg-config] unify libdir 2023-04-24 22:01:15 +02:00
Armin Novak f0e9797b4c [build] require CMake >= 3.13
required for target_link_options
2023-02-27 11:18:02 +01:00
akallabeth 82ba9ede9c [freerdp] use FREERDP_/UWAC_/RDTK_ prefix for conditional headers 2023-01-10 17:38:00 +01:00
Armin Novak de0c42273e [uwac] add key repeat state to UwacKeyEvent 2022-12-13 14:37:05 +01:00
akallabeth 37ab25e19d Fixed all Wdocumentation warnings 2022-12-12 14:24:55 +01:00
akallabeth d4808dd3e1 Fixed various compiler warnings 2022-12-09 15:58:26 +01:00
Jonas Ådahl 5b09cd57a7 uwac/input: Don't pass hotspot as offset when attaching cursor buffer
Passing a non-zero offset to cursor buffer and then calling
wl_pointer.set_cursor doesn't make much sense, as any offset will
immediately be reset. The protocol specifies the cursor set by
wl_pointer.set_cursor to be

> The parameters hotspot_x and hotspot_y define the position of
> the pointer surface relative to the pointer location. Its
> top-left corner is always at (x, y) - (hotspot_x, hotspot_y),
> where (x, y) are the coordinates of the pointer location, in
> surface-local coordinates.

This leaves no room available for any previously set offsets to be kept
in response to wl_pointer.set_cursor.
2022-11-16 19:17:08 +01:00
Jonas Ådahl b2cf6f5c2c uwac/input: Set the right serial when setting cursor
The serial in wl_pointer.set_cursor must exactly match the one from
wl_pointer.enter, it should not use whatever serial for any input class
is the newest.
2022-11-16 19:17:08 +01:00
Benoît Gschwind 1cf69f04e6 uwac: fix wl_buffer_destroy of wl_cursor buffer
Following the wayland-cursor documentation [1] the buffer created by
wl_cursor_image_get_buffer should not be destroyed. The new code avoid to
destroy it by avoiding to connect the release callback to this buffer.

[1] https://gitlab.freedesktop.org/wayland/wayland/-/blob/main/cursor/wayland-cursor.c#L147-L154
2022-10-19 17:18:07 +02:00
akallabeth bf56a39e6f
Fixed #8090: Duplicate definition of strndup (#8102)
* Fixed #8090: Duplicate definition of strndup

* Moved strndup detection to winpr

Co-authored-by: Armin Novak <anovak@thincast.com>
2022-08-02 09:15:38 +02:00
akallabeth bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
akallabeth 1aacf504a1 Increase C standard to C11 2022-06-03 08:51:40 +02:00
akallabeth a0ca2b4a6e Add LTO settings 2022-06-03 08:51:40 +02:00
Armin Novak d1f8c00f7b Fixed duplicated symbols 2022-03-03 11:26:48 +01:00
Armin Novak 5e11f0da28 Reorganized UWAC headers 2022-03-03 11:26:48 +01:00
Armin Novak cb27338bf4 Set required C standard to C99 with extensions 2022-02-24 12:31:58 +01:00
Armin Novak fd027d1bf0 Removed BUILTIN_CHANNELS
Building client channels out of tree does not work reliable as the
dependencies can not be easily split. (exceptions may be simple ones
as echo channel)
It does complicate the build system and code though, so remove this
for maintainability reasons.
2022-02-23 10:43:46 +01:00
Sumir Jha 3d77496fbb memory grows over time in wlfreerdp with /gfx:AVC44 fixed. 2022-02-15 10:58:41 +00: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
Kshitij Kadam 628c465d38 uwac-window: Make ivi surface-id configurable
The ivi surface-id is made configurable by fetching it from the
environment variables. An environment variable IVI_SURFACE_ID needs to
be set to the required surface-id. In case it is not set then the code
will take 1 as the default surface-id.

Signed-off-by: Kshitij Kadam <Kshitij.Kadam@ifm.com>
2022-02-01 09:26:22 +01:00
Kshitij Kadam 8728f52f34 uwac-window: Change protocol selection order
The current order of protocol selection is xdg_base followed by
ivi_application followed by fullscreen_shell. As a result xdg_base
protocol will be selected even if ivi_application protocol is needed.

The order is now changed to ivi_application followed by fullscreen_shell
followed by xdg_base. It is now possible to select any one of the three
protocols by appropriately defining BUILD_IVI and BUILD_FULLSCREEN_SHELL
macro.

Signed-off-by: Kshitij Kadam <Kshitij.Kadam@ifm.com>
2022-02-01 09:26:22 +01:00
dance cbc6b666ae wayland: fixed memory corruption issue (write to free'd memory)
pass window and buffer index to buffer_release listener, so that it
fetches actual pointer to released buffer by wayland, instead of
directly passing a pointer to the UwacBuffer, which could result in
heap-use-after-free
2022-01-27 10:52:02 +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 f1e6c6b131 Fix #7570: Limit mouse events to positive values
Wayland API might report mouse events slightly outside the window,
clamp the values to that negative coordinates are skipped.
2022-01-24 11:57:22 +01:00
Armin Novak 4b719df371 Fixed #7521: Ensure '\0' termination of clipboard strings 2022-01-10 11:19:28 +01:00
Marek Vasut c1f44721c5 uwac: Fix connection between mouse-less devices
In case the seat has no default_cursor, which happens on client device with
no mouse attached (e.g. tablets), freerdp would fail to connect because it
won't be able to set cursor image. Check for this condition and skip setting
the cursor image.

Signed-off-by: Marek Vasut <marex@denx.de>
2021-11-29 15:47:23 +01:00
Guillaume Démurgé 8e334d3bfd Added app_id on wayland client 2021-11-12 15:58:39 +01:00
Armin Novak e821c93cc4 Removed duplicate HAVE_PIXMAN_REGION definition 2021-10-14 13:04:59 +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 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 ed7e3761f1 Fixed include paths for uwac 2021-06-28 15:06:30 +02:00
Armin Novak 2e42df9515 Fixed HAVE_PTHREAD_MUTEX_TIMEDLOCK 2021-06-28 15:06:30 +02:00
Armin Novak fd08c77f7f Fixed definition of config.h symbols 2021-06-28 15:06:30 +02:00