Remove unused code

This commit is contained in:
Kovid Goyal 2021-01-08 13:32:52 +05:30
parent b94d2b27f4
commit edfc6903ce
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 1 additions and 10 deletions

View File

@ -42,6 +42,7 @@ typedef unsigned long long id_type;
typedef uint32_t char_type;
typedef uint32_t color_type;
typedef uint16_t hyperlink_id_type;
typedef int key_type;
#define HYPERLINK_MAX_NUMBER UINT16_MAX
typedef uint16_t combining_type;
typedef uint32_t pixel;

View File

@ -22,10 +22,6 @@ extern size_t cocoa_get_workspace_ids(void *w, size_t *workspace_ids, size_t arr
extern monotonic_t cocoa_cursor_blink_interval(void);
#if GLFW_KEY_LAST >= MAX_KEY_COUNT
#error "glfw has too many keys, you should increase MAX_KEY_COUNT"
#endif
static GLFWcursor *standard_cursor = NULL, *click_cursor = NULL, *arrow_cursor = NULL;
static void set_os_window_dpi(OSWindow *w);
@ -261,9 +257,6 @@ key_callback(GLFWwindow *w, GLFWkeyevent *ev) {
}
}
global_state.callback_os_window->cursor_blink_zero_time = monotonic();
if (ev->key >= 0 && ev->key <= GLFW_KEY_LAST) {
global_state.callback_os_window->is_key_pressed[ev->key] = ev->action == GLFW_RELEASE ? false : true;
}
if (is_window_ready_for_callbacks()) on_key_input(ev);
global_state.callback_os_window = NULL;
request_tick_callback();

View File

@ -135,8 +135,6 @@ typedef struct {
BorderRects border_rects;
} Tab;
#define MAX_KEY_COUNT 512
typedef struct {
int x, y, w, h;
bool is_set;
@ -173,7 +171,6 @@ typedef struct {
double logical_dpi_x, logical_dpi_y, font_sz_in_pts;
bool mouse_button_pressed[32];
PyObject *window_title;
bool is_key_pressed[MAX_KEY_COUNT];
bool viewport_size_dirty, viewport_updated_at_least_once;
LiveResizeInfo live_resize;
bool has_pending_resizes, is_semi_transparent, shown_once, is_damaged;