FreeRDP/uwac/libuwac
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
..
CMakeLists.txt [uwac] add missing library link 2024-02-09 10:29:08 +01:00
uwac-clipboard.c [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
uwac-display.c [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
uwac-input.c [coverity] 1543074 Dereference before null check 2024-04-12 12:41:42 +02:00
uwac-os.c [tidy] move loop variable declaration to loop 2024-02-22 12:31:50 +01:00
uwac-os.h Reformatted to new style 2019-11-07 10:53:54 +01:00
uwac-output.c [uwac] output: take a max scale into scaling code 2024-01-11 16:00:40 +01:00
uwac-priv.h [uwac] add scaling support using viewporter protocol 2024-01-05 14:17:38 +01:00
uwac-tools.c [clang-tidy] cppcoreguidelines-init-variables 2024-02-15 11:49:16 +01:00
uwac-utils.c Reorganized UWAC headers 2022-03-03 11:26:48 +01:00
uwac-utils.h [warnings] fix -Wcast-qual 2023-11-24 18:19:03 +01:00
uwac-window.c uwac: fix window handling/viewport 2024-04-23 12:19:00 +02:00