Commit Graph

204 Commits

Author SHA1 Message Date
akallabeth
aa954d9be9
[warnings] fix various compiler warnings 2024-10-29 15:49:43 +01:00
akallabeth
a27d9508e2
[cmake] unify CFLAGS to string
* move to common CMake function
* escape CFLAGS
2024-10-25 11:40:43 +02:00
akallabeth
1675d926d2
Merge pull request #10776 from akallabeth/packaging-tests
[cmake] split tests
2024-10-24 11:26:17 +02:00
akallabeth
de055a6765
Merge pull request #10777 from akallabeth/cmake-build-type
[cmake] enforce a supported build type
2024-10-24 09:47:47 +02:00
Armin Novak
527db6783b
[cmake] split tests
* Keep BUILD_TESTING, but only run tests compatible with API (for
  packaging)
* Add BUILD_TESTING_INTERNAL for all tests including internal function
  tests that modify API to be run on our CI
2024-10-24 09:45:44 +02:00
akallabeth
aa9b03df25
[cmake] generate full buildflags.h CFLAGS
Combine current configuration flags with CMAKE_C_FLAGS
2024-10-24 09:08:08 +02:00
Armin Novak
0545a8a5ef
[uwac] fix sign warnings 2024-10-23 11:02:52 +02:00
akallabeth
cfc37caeb8
[cmake] cleaning_configure_file
add a wrapper to automatically add generated files to clean target
2024-10-02 23:28:08 +02:00
akallabeth
ba47e1936f
[uwac] add strerror_r detection and use 2024-09-30 15:41:52 +02:00
akallabeth
861f699d92
[uwac] fix uwac seat functions
change arguments to match prototypes
2024-09-11 20:49:03 +02:00
akallabeth
e864fed61f
[uwac] disable clang-tidy for generated files 2024-09-11 20:48:43 +02:00
akallabeth
5e123735fa
[warnings] fixed sign-compare 2024-09-04 10:14:05 +02:00
akallabeth
72ae7fb54f
[nolint] add cert-dcl37-c,cert-dcl51-cpp 2024-09-03 12:24:48 +02:00
Armin Novak
fe4cb6de65
[warnings] fix float/double warnings 2024-09-02 16:20:20 +02:00
akallabeth
7c1fd71b7b
[uwac] elminate pedantic warnings from defines 2024-08-30 15:40:08 +02:00
akallabeth
457d6f7578
[warnings] fix clang-tidy issues in uwac 2024-08-29 15:20:45 +02:00
akallabeth
1d33095500
[warnings] fix cert-err33-c
Fix unused return values, cast to void if on purpose
2024-08-29 10:19:27 +02:00
akallabeth
b0afe43d34
[uwac] remove broken function attribute 2024-08-28 08:50:17 +02:00
akallabeth
56d660f258
[cmake] mark dependency includes SYSTEM
Mark all dependency include paths SYSTEM so warnings from system headers
are excluded from ci warning statistics
2024-08-26 11:10:49 +02:00
akallabeth
86e2789d9b
[coverity] fix warnings 2024-08-26 09:19:06 +02:00
Armin Novak
6289482283
[uwac] fix compiler warnings 2024-07-22 11:06:13 +02:00
Armin Novak
1024a1a195 Revert "[coverity] 1543170 Resource leak"
This reverts commit d24bb658ec.
2024-07-04 12:11:26 +02:00
Armin Novak
e71da381cc
[uwac] fix wrong data type 2024-07-03 14:03:24 +02:00
akallabeth
0f567c9ac5
[uwac,window] fix size_t additions 2024-07-02 13:17:12 +02:00
akallabeth
4099bd4e45
[warnings] integer casts/checks 2024-07-02 12:38:00 +02:00
akallabeth
c07ba558cb
[warnings] fix various compiler warnings 2024-06-04 13:23:24 +02:00
Mariusz Bialonczyk
839f3e8408 uwac: fix window handling/viewport
Parameters passed to wp_viewport_set_destination was scaled instead of
the actual window size. In fact I noticed this problem when I was
testing the initial change (c29ba7985) but was not sure about how to fix
this and moreover, the tiling manager which I am using (sway) is
immediatelly tiling the window and all seems fine in day-to-day use
with tiled window.
The problem was only visible when the window was changed to floating:
the window content was scaled properly but the viewport was twice as
big (thus a whole window). What is worse it seems that the scaling was
done multiple times making a huge window size in some circumstances.

Now in new sway version 1.9 authors added an assert which prevents from
having a window which overlaps different renderers and this also trigger
this problem in FreeRDP, because when starting the window size was too
big.
This was leading to:
wp_viewport@31: error 2: source rectangle out of buffer bounds
or even sway crash

This commit is fixing this problem by using a proper window size values
(initially passed to a function and saved to additional variables before
scaling calculation).
Window size is now correct even when changed to a floating window.
2024-04-23 12:19:00 +02:00
akallabeth
0d09ae9ad4 [coverity] 1543074 Dereference before null check 2024-04-12 12:41:42 +02:00
akallabeth
d24bb658ec [coverity] 1543170 Resource leak 2024-04-12 09:45:09 +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
a7fb0d5c75 [uwac] add missing library link 2024-02-09 10:29:08 +01:00
Mariusz Bialonczyk
4c17dfb71d [uwac] output: take a max scale into scaling code
Fix for a hybrid multimonitor configurations:
Previous code was working for me because the display with scale=2
was last on the wayland display list. After restarting it was earlier.
To fix this - just take the highest scale provided by a display.
Similar as eg. here the SDL is doing:
b5bc64aa55/src/video/wayland/SDL_waylandwindow.c (L1170)
2024-01-11 16:00:40 +01:00
Mariusz Bialonczyk
26017c71bd [uwac] input: release pressed keys when loosing window focus
The commit is fixing the problem when eg. a user is pressing some
modifier key to switch from active FreeRDP window and when get back to
that window, it "virtually" has that modifier key pressed, thus leading
to pressing eg. `Win+r` instead of just `r`.
2024-01-11 16:00:40 +01:00
Mariusz Bialonczyk
36e79b449d [uwac] input: fix keyboard "sticky" keys when entering window
The commit is fixing the following problem:
When the freerdp window gets keyboard focus and is notified,
it wrongly process keys which are *held*, not a freshly pressed.

The comment in the code explains it more.
2024-01-11 16:00:40 +01:00
akallabeth
f6a208f75e [cmake] generate relative pkgconfig path
generate the relative pkgconfig path from the actual install locations.
fixes #9718
2024-01-05 14:19:34 +01:00
Mariusz Bialonczyk
09c1269962 [uwac] window: fix damage region dimensions (rounding errors) 2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
d56af70dc1 [uwac] input: fix a crash when the pointer_focus is not set yet when starting 2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
72b6c7096d [uwac] scaling: fix damage surface
Some detailed overview of this change:
I was trying to use the wl_surface_damage_buffer() [1] function, like in
this [2] code, but there were some problems with calling it; even more,
we also need to check the compositor version before calling it.
Next approach was using full damage like described here [3]. This was
working fine, but it was of course suboptimal. Finally: looking at
chromium/ozone code [4] I ended up with correctly calculating the damage
region within surface coordinates.

Refs:
[1] https://wayland-client-d.dpldocs.info/wayland.client.protocol.wl_surface_damage_buffer.html
[2] b01c31b24f/clients/simple-damage.c (L585)
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1648872#c21
[4] 6763b7710c/ui/ozone/platform/wayland/host/wayland_surface.cc (118)
2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
b14fe531a6 [uwac] window: check for viewporter before invoking wp_viewporter_get_viewport() 2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
8d661cc85a [uwac] input: fix cursor scaling
Fixes #9687
2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
f73ecf6000 [uwac] input: pointer_handle_motion: take a scale into account 2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
c29ba79851 [uwac] add scaling support using viewporter protocol
Wayland compositors can support the wp_viewporter protocol,
which allows for the mapping of arbitrarily sized buffer
regions to output surfaces.
This result in correct scaling on HiDPI outputs with scaling
enabled.
2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
5f0db48443 [uwac] output: assign actual_scale to display 2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
472c0920cc [uwac] display: add viewporter 2024-01-05 14:17:38 +01:00
Mariusz Bialonczyk
9f60438102 [uwac] add viewporter protocol 2024-01-05 14:17:38 +01:00
Armin Novak
a7decba8c2 [cmake] unify common options 2023-12-22 16:21:30 +01:00
Armin Novak
4aad6e9d42 [cmake] add UWAC_FORCE_STATIC_BUILD
since uwac is only used by wlfreerdp add an option to directly link it
with -DUWAC_FORCE_STATIC_BUILD=ON without installing any header or
library
2023-12-21 18:56:51 +01:00
Armin Novak
e67b6765a1 [cmake] add UWAC_FORCE_STATIC_BUILD
since uwac is only used by wlfreerdp add an option to directly link it
with -DUWAC_FORCE_STATIC_BUILD=ON without installing any header or
library
2023-12-21 17:29:39 +01:00