projects
/
platform
/
upstream
/
enlightenment.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
789c728
)
e_devicemgr_input: Do not allow warp pointer (cursor) outside the compositor canvas
49/319749/1
author
duna.oh
<duna.oh@samsung.com>
Mon, 17 Feb 2025 04:25:50 +0000
(13:25 +0900)
committer
duna.oh
<duna.oh@samsung.com>
Mon, 17 Feb 2025 08:43:03 +0000
(17:43 +0900)
Change-Id: I3ef22600b18bdce9ca9c4476324524a390d10d90
src/bin/inputmgr/e_devicemgr_input.c
patch
|
blob
|
history
diff --git
a/src/bin/inputmgr/e_devicemgr_input.c
b/src/bin/inputmgr/e_devicemgr_input.c
index c1a11644888eebe9ffe9a0b9a53e609f5ed380a8..970487b75edeff74a96c28d4ab1cc8f0955f9f66 100644
(file)
--- a/
src/bin/inputmgr/e_devicemgr_input.c
+++ b/
src/bin/inputmgr/e_devicemgr_input.c
@@
-33,6
+33,14
@@
e_devicemgr_strcmp(const char *dst, const char *src)
static int
_e_devicemgr_input_pointer_warp(int x, int y)
{
+ int comp_w = 0, comp_h = 0;
+ e_comp_size_get(&comp_w, &comp_h);
+
+ if (x < 0) x = 0;
+ else if (x > comp_w - 1) x = comp_w - 1;
+ if (y < 0) y = 0;
+ else if (y > comp_h - 1) y = comp_h - 1;
+
e_input_device_pointer_warp(NULL, x, y);
DMWRN("The pointer warped to (%d, %d) !\n", x, y);