summaryrefslogtreecommitdiff
path: root/src/lib/elput/elput_evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/elput/elput_evdev.c')
-rw-r--r--src/lib/elput/elput_evdev.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/lib/elput/elput_evdev.c b/src/lib/elput/elput_evdev.c
index e29600ce50..8067f24783 100644
--- a/src/lib/elput/elput_evdev.c
+++ b/src/lib/elput/elput_evdev.c
@@ -60,16 +60,21 @@ _keyboard_modifiers_update(Elput_Keyboard *kbd, Elput_Seat *seat)
60static int 60static int
61_keyboard_fd_get(off_t size) 61_keyboard_fd_get(off_t size)
62{ 62{
63 const char *path;
63 Eina_Tmpstr *fullname; 64 Eina_Tmpstr *fullname;
64 long flags; 65 long flags;
65 int fd = 0; 66 int fd = 0;
67 char tmp[PATH_MAX];
66 Efl_Vpath_File *file_obj; 68 Efl_Vpath_File *file_obj;
67 69
68 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, 70 file_obj = efl_vpath_manager_fetch(EFL_VPATH_MANAGER_CLASS, "(:run:)/");
69 "(:run:)/elput-keymap-XXXXXX"); 71 efl_vpath_file_do(file_obj);
70 fd = eina_file_mkstemp(efl_vpath_file_result_get(file_obj), &fullname); 72 efl_vpath_file_wait(file_obj);
73 path = efl_vpath_file_result_get(file_obj);
74 snprintf(tmp, sizeof(tmp), "%s/elput-keymap-XXXXXX", path);
71 efl_del(file_obj); 75 efl_del(file_obj);
72 76
77 fd = eina_file_mkstemp(tmp, &fullname);
73 if (fd < 0) return -1; 78 if (fd < 0) return -1;
74 79
75 flags = fcntl(fd, F_GETFD); 80 flags = fcntl(fd, F_GETFD);