Commit Graph

54 Commits

Author SHA1 Message Date
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
Mariusz Bialonczyk
09c1269962 [uwac] window: fix damage region dimensions (rounding errors) 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
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
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
akallabeth
82ba9ede9c [freerdp] use FREERDP_/UWAC_/RDTK_ prefix for conditional headers 2023-01-10 17:38:00 +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
akallabeth
bc8b4ade1c reformatted 2022-06-23 08:48:39 +02:00
Armin Novak
5e11f0da28 Reorganized UWAC headers 2022-03-03 11:26:48 +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
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
cbb39709b9 uwac: Fixed warnings, added assertions 2021-06-18 11:32:16 +02:00
akallabeth
43311130a2 Fixed CodeQL warnings 2021-02-19 11:19:49 +01:00
0140454
30233a4c74 Dont' commit surface in configure handler 2021-02-04 09:15:38 +01:00
akallabeth
c902f583d0 Fixed missing lock during buffer submit. 2020-06-18 08:42:24 +02:00
akallabeth
1bc48b058f Fixed double free for uwac buffers 2020-06-16 14:26:38 +02:00
Sascha Wessel
11facf8909 libuwac/window: Fix memory leak / SIGBUS
`UwacWindowShmAllocBuffers()` allocates memory with `mmap` and never frees it
resulting in SIGBUS errors and running out of memory after some time.

Adding a corresponding `munmap` fixes this issue.
2020-04-26 19:19:31 +02:00
Armin Novak
7c243da6e1 Remove symbols exported by accident. 2019-12-02 10:57:31 +01:00
Armin Novak
72ca88f49c Reformatted to new style 2019-11-07 10:53:54 +01:00
Kenny Levinsen
3c18555693 uwac: Only submit dirty buffers 2019-07-30 09:46:57 +02:00
Kenny Levinsen
2548fd4aae uwac: Make damage tracking more readable 2019-07-30 09:46:57 +02:00
Kenny Levinsen
49674d57f6 uwac: Re-enable damage tracking 2019-07-30 09:46:57 +02:00
Kenny Levinsen
4df57d915d uwac: Do not unconditionally set pendingBuffer on configure
If pendingBuffer is set when it was otherwise NULL, then
UwacWindowSubmitBuffer will forever bail early, waiting for a frame
callback that will never come.
2019-07-30 09:46:57 +02:00
Kenny Levinsen
7dda8362e7 uwac: Acknowledge xdg_surface configure messages
This is necessary for the surface to have its role configured.
2019-07-30 09:46:57 +02:00
Armin Novak
1a46ef2a82 Fixed unused variable warnings. 2019-04-05 09:13:24 +02:00
Armin Novak
0d389d09a3 Fix 5243: Allocate buffers zero in uwac. 2019-02-11 11:54:19 +01:00
Armin Novak
b1e6e232ee Fixed buffer submit and callback cleanup.
* Buffer submit now ignores duplicate buffer submit again.
* Frame callback is cleaned up in the callback function now.
* Damage region is currently ignored as there are screen artifacts otherwise.
2019-01-25 10:50:07 +01:00
Armin Novak
823411c2f3 Fixed wayland buffer updates
The wayland buffer size always matches the current window size.
That might be different from the actual remote framebuffer size,
to when copying always use the correct strides to avoid distorted
screen content.
2019-01-25 10:49:03 +01:00
David Fort
4c465e7f16
Merge pull request #5209 from akallabeth/wayland_protocol_update_and_keyboard_inhibit
Wayland protocol update and keyboard inhibit support
2019-01-23 10:02:07 +01:00
Armin Novak
9a0c8a5c53 Removed unused label. 2019-01-22 18:09:53 +01:00
Armin Novak
3cd3490fd1 Fixed initialization of window decorations. 2019-01-22 17:21:09 +01:00
Armin Novak
5c422b7c93 Added KDE server side window decoration interface as fallback. 2019-01-22 17:10:32 +01:00
Armin Novak
f2fd785128 Fixed comment. 2019-01-22 16:55:46 +01:00
Armin Novak
afd4baf4dd Added wayland server side decorations. 2019-01-22 15:45:15 +01:00
Armin Novak
81f1fb934c Implemented keyboard shortcut inhibit support. 2019-01-22 14:27:12 +01:00
Armin Novak
0ef64f8a84 Updated fullscreen shell to current protocol level. 2019-01-22 13:09:59 +01:00
Armin Novak
a5cee1751f Resubmit buffer if necessary. 2019-01-18 14:39:14 +01:00
Ondrej Holy
24eb53e207 uwac: Fix leak found by covscan
leaked_storage: Variable "data" going out of scope leaks the storage it points to.
copy_paste_error: "opaque_region" in "w->opaque_region" looks like a copy-paste error.
2018-08-22 14:34:02 +02:00
Ondrej Holy
91c398dc94 uwac: Format code by astyle
Run ./scripts/format_code.sh before the following changes.
2018-08-22 14:34:02 +02:00
Olivier Blin
77d8aaf97b Implement fullscreen for wayland shell surface 2017-07-05 18:47:52 +02:00