summaryrefslogtreecommitdiffstats
path: root/uwac
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 01:25:12 +0000
commit827a4c3faa27e0c186452585b15094eee1119085 (patch)
treee6a08b0c767863d66f7d4a9de80db5edc7db29be /uwac
parentReleasing progress-linux version 3.3.0+dfsg1-1~progress7.99u1. (diff)
downloadfreerdp3-827a4c3faa27e0c186452585b15094eee1119085.tar.xz
freerdp3-827a4c3faa27e0c186452585b15094eee1119085.zip
Merging upstream version 3.5.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'uwac')
-rw-r--r--uwac/libuwac/uwac-input.c4
-rw-r--r--uwac/libuwac/uwac-window.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/uwac/libuwac/uwac-input.c b/uwac/libuwac/uwac-input.c
index 5ad52ae..b11b1a4 100644
--- a/uwac/libuwac/uwac-input.c
+++ b/uwac/libuwac/uwac-input.c
@@ -818,6 +818,8 @@ static void pointer_handle_motion(void* data, struct wl_pointer* pointer, uint32
assert(input);
UwacWindow* window = input->pointer_focus;
+ if (!window || !window->display)
+ return;
int scale = window->display->actual_scale;
int sx_i = wl_fixed_to_int(sx_w) * scale;
@@ -825,7 +827,7 @@ static void pointer_handle_motion(void* data, struct wl_pointer* pointer, uint32
double sx_d = wl_fixed_to_double(sx_w) * scale;
double sy_d = wl_fixed_to_double(sy_w) * scale;
- if (!window || (sx_i < 0) || (sy_i < 0))
+ if ((sx_i < 0) || (sy_i < 0))
return;
input->sx = sx_d;
diff --git a/uwac/libuwac/uwac-window.c b/uwac/libuwac/uwac-window.c
index 49728bd..90669aa 100644
--- a/uwac/libuwac/uwac-window.c
+++ b/uwac/libuwac/uwac-window.c
@@ -379,6 +379,8 @@ int UwacWindowShmAllocBuffers(UwacWindow* w, int nbuffers, int allocSize, uint32
wl_shm_pool_destroy(pool);
w->nbuffers += nbuffers;
+ munmap(data, 1ull * allocSize * nbuffers);
+
error_mmap:
close(fd);
return ret;