Fix a regression that broke drag and drop on macOS

Fixes #2605
This commit is contained in:
Kovid Goyal 2020-04-29 09:12:04 +05:30
parent 5c38aabf0e
commit b738f4d4ff
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 5 additions and 9 deletions

View File

@ -17,6 +17,8 @@ To update |kitty|, :doc:`follow the instructions <binary>`.
- Fix a regression that caused clicking in the padding/margins of windows in
the stack layout to switch the window to the first window (:iss:`2604`)
- Fix a regression that broke drag and drop on macOS (:iss:`2605`)
0.17.3 [2020-04-23]
--------------------

View File

@ -327,17 +327,11 @@ drop_callback(GLFWwindow *w, const char *mime, const char *data, size_t sz) {
if (strcmp(mime, "text/uri-list") == 0) return 3;
if (strcmp(mime, "text/plain;charset=utf-8") == 0) return 2;
if (strcmp(mime, "text/plain") == 0) return 1;
return 0;
goto end;
}
WINDOW_CALLBACK(on_drop, "sy#", mime, data, (int)sz);
WINDOW_CALLBACK(on_drop, "sy#", mime, data, (Py_ssize_t)sz);
request_tick_callback();
/* PyObject *s = PyTuple_New(count); */
/* if (s) { */
/* for (int i = 0; i < count; i++) PyTuple_SET_ITEM(s, i, PyUnicode_FromString(strings[i])); */
/* WINDOW_CALLBACK(on_drop, "O", s); */
/* Py_CLEAR(s); */
/* request_tick_callback(); */
/* } */
end:
global_state.callback_os_window = NULL;
return 0;
}