use a environment "TIZEN_WAYLAND_SHM_DIR" as a path of shared memory.
authorSeunghun Lee <shiin.lee@samsung.com>
Tue, 15 Mar 2016 08:52:11 +0000 (17:52 +0900)
committerJunkyeong Kim <jk0430.kim@samsung.com>
Thu, 16 Feb 2023 09:52:51 +0000 (18:52 +0900)
allow to locate the shm file in the Tizen specific directory.

Change-Id: If11af6064b6a94fe1d7940cc76d7c59e7ba1bf48

cursor/os-compatibility.c

index f2445ce..4857b12 100644 (file)
@@ -136,8 +136,11 @@ os_create_anonymous_file(off_t size)
        } else
 #endif
        {
-               path = getenv("XDG_RUNTIME_DIR");
-               if (!path || path[0] != '/') {
+               path = getenv("TIZEN_WAYLAND_SHM_DIR");
+               if (!path)
+                       path = getenv("XDG_RUNTIME_DIR");
+
+               if (!path) {
                        errno = ENOENT;
                        return -1;
                }