mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-26 14:53:26 +01:00
Merge branch 'master' into fix-chat-infobox-flicker
Fixed cursor position issue
This commit is contained in:
commit
41a8401ac5
@ -369,7 +369,7 @@ static void prompt_onDraw(ToxWindow *self, Tox *m)
|
|||||||
int new_x = ctx->start ? x2 - 1 : MAX(0, wcswidth(ctx->line, ctx->pos));
|
int new_x = ctx->start ? x2 - 1 : MAX(0, wcswidth(ctx->line, ctx->pos));
|
||||||
wmove(self->window, y + 1, new_x);
|
wmove(self->window, y + 1, new_x);
|
||||||
|
|
||||||
wrefresh(self->window);
|
wnoutrefresh(self->window);
|
||||||
|
|
||||||
if (self->help->active)
|
if (self->help->active)
|
||||||
help_onDraw(self);
|
help_onDraw(self);
|
||||||
|
@ -471,6 +471,11 @@ static void draw_window_tab(ToxWindow *toxwin)
|
|||||||
|
|
||||||
static void draw_bar(void)
|
static void draw_bar(void)
|
||||||
{
|
{
|
||||||
|
int y,x;
|
||||||
|
|
||||||
|
// save current cursor position
|
||||||
|
getyx(active_window->window, y, x);
|
||||||
|
|
||||||
attron(COLOR_PAIR(BLUE));
|
attron(COLOR_PAIR(BLUE));
|
||||||
mvhline(LINES - 2, 0, '_', COLS);
|
mvhline(LINES - 2, 0, '_', COLS);
|
||||||
attroff(COLOR_PAIR(BLUE));
|
attroff(COLOR_PAIR(BLUE));
|
||||||
@ -508,6 +513,9 @@ static void draw_bar(void)
|
|||||||
attroff(A_BOLD);
|
attroff(A_BOLD);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// restore cursor position after drawing
|
||||||
|
move(y, x);
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -525,6 +533,7 @@ void draw_active_window(Tox *m)
|
|||||||
|
|
||||||
touchwin(a->window);
|
touchwin(a->window);
|
||||||
a->onDraw(a, m);
|
a->onDraw(a, m);
|
||||||
|
wrefresh(a->window);
|
||||||
|
|
||||||
/* Handle input */
|
/* Handle input */
|
||||||
bool ltr;
|
bool ltr;
|
||||||
|
Loading…
Reference in New Issue
Block a user