diff options
Diffstat (limited to 'src/w32term.c')
| -rw-r--r-- | src/w32term.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/w32term.c b/src/w32term.c index 170f33ecd67..6137d54c837 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -3161,7 +3161,7 @@ construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f) | |||
| 3161 | HDROP hdrop; | 3161 | HDROP hdrop; |
| 3162 | POINT p; | 3162 | POINT p; |
| 3163 | WORD num_files; | 3163 | WORD num_files; |
| 3164 | char *name; | 3164 | guichar_t *name; |
| 3165 | int i, len; | 3165 | int i, len; |
| 3166 | 3166 | ||
| 3167 | result->kind = DRAG_N_DROP_EVENT; | 3167 | result->kind = DRAG_N_DROP_EVENT; |
| @@ -3186,12 +3186,17 @@ construct_drag_n_drop (struct input_event *result, W32Msg *msg, struct frame *f) | |||
| 3186 | 3186 | ||
| 3187 | for (i = 0; i < num_files; i++) | 3187 | for (i = 0; i < num_files; i++) |
| 3188 | { | 3188 | { |
| 3189 | len = DragQueryFile (hdrop, i, NULL, 0); | 3189 | len = GUI_FN (DragQueryFile) (hdrop, i, NULL, 0); |
| 3190 | if (len <= 0) | 3190 | if (len <= 0) |
| 3191 | continue; | 3191 | continue; |
| 3192 | name = alloca (len + 1); | 3192 | |
| 3193 | DragQueryFile (hdrop, i, name, len + 1); | 3193 | name = alloca ((len + 1) * sizeof (*name)); |
| 3194 | GUI_FN (DragQueryFile) (hdrop, i, name, len + 1); | ||
| 3195 | #ifdef NTGUI_UNICODE | ||
| 3196 | files = Fcons (from_unicode_buffer (name), files); | ||
| 3197 | #else | ||
| 3194 | files = Fcons (DECODE_FILE (build_string (name)), files); | 3198 | files = Fcons (DECODE_FILE (build_string (name)), files); |
| 3199 | #endif /* NTGUI_UNICODE */ | ||
| 3195 | } | 3200 | } |
| 3196 | 3201 | ||
| 3197 | DragFinish (hdrop); | 3202 | DragFinish (hdrop); |