mirror of
https://github.com/mintycube/st.git
synced 2024-10-22 14:05:49 +02:00
Update XIM cursor position only if changed
Updating XIM cursor position is expensive, so only update it when cursor position changed.
This commit is contained in:
parent
60d1827504
commit
ae97f681fc
4
st.c
4
st.c
@ -2731,6 +2731,7 @@ void
|
||||
drawregion(int x1, int y1, int x2, int y2)
|
||||
{
|
||||
int y;
|
||||
|
||||
for (y = y1; y < y2; y++) {
|
||||
if (!term.dirty[y])
|
||||
continue;
|
||||
@ -2767,7 +2768,8 @@ draw(void)
|
||||
#endif // SCROLLBACK_PATCH
|
||||
xdrawcursor(cx, term.c.y, term.line[term.c.y][cx],
|
||||
term.ocx, term.ocy, term.line[term.ocy][term.ocx]);
|
||||
term.ocx = cx, term.ocy = term.c.y;
|
||||
term.ocx = cx;
|
||||
term.ocy = term.c.y;
|
||||
xfinishdraw();
|
||||
if (ocx != term.ocx || ocy != term.ocy)
|
||||
xximspot(term.ocx, term.ocy);
|
||||
|
Loading…
Reference in New Issue
Block a user