summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-27 23:15:43 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-27 23:15:43 -0500
commit7089b92ff5606f1e9b934e2236b0295dcab922ae (patch)
tree41980ac3ef408fd8b89509a3b1670cd903feff22 /main.c
parent2db1e71ace9d9a91e35ef57c3901c7ebae8f82f0 (diff)
start tab moving
Diffstat (limited to 'main.c')
-rw-r--r--main.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/main.c b/main.c
index 02580f0..863c574 100644
--- a/main.c
+++ b/main.c
@@ -365,6 +365,8 @@ int main(int argc, char **argv) {
ted->cursor_arrow = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
ted->cursor_resize_h = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZEWE);
ted->cursor_resize_v = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZENS);
+ ted->cursor_hand = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND);
+ ted->cursor_move = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZEALL);
Uint32 time_at_last_frame = SDL_GetTicks();
@@ -724,6 +726,9 @@ int main(int argc, char **argv) {
}
#endif
+ if (ted->dragging_tab_node)
+ ted->cursor = ted->cursor_move;
+
SDL_SetWindowTitle(window, ted->window_title);
SDL_SetCursor(ted->cursor);
@@ -740,21 +745,20 @@ int main(int argc, char **argv) {
}
- build_stop(ted);
-
-
- if (ted->menu)
- menu_close(ted); // free any memory used by the current menu
-
- if (log) fclose(log);
SDL_FreeCursor(ted->cursor_arrow);
SDL_FreeCursor(ted->cursor_ibeam);
SDL_FreeCursor(ted->cursor_resize_h);
SDL_FreeCursor(ted->cursor_resize_v);
+ SDL_FreeCursor(ted->cursor_hand);
+ SDL_FreeCursor(ted->cursor_move);
SDL_GL_DeleteContext(glctx);
SDL_DestroyWindow(window);
SDL_Quit();
+ build_stop(ted);
+ if (ted->menu)
+ menu_close(ted); // free any memory used by the current menu
+ if (log) fclose(log);
find_close(ted);
tag_selector_close(ted);
for (u16 i = 0; i < TED_MAX_BUFFERS; ++i)