[PATCH 3/4] WINGs: fix cursor ghosting issue in wtextfield
0 views
Skip to first unread message
david.m...@gmail.com
unread,
Jan 22, 2026, 5:30:59 PM (11 days ago) Jan 22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Window Maker Development
The cursor is moved using right/left arrows but as it's blinking and a XOR function is used to hide/unhide it, it happens the cursor can be not hidden properly from its previous position. Better to refresh the view to avoid such issues. --- WINGs/wtextfield.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/WINGs/wtextfield.c b/WINGs/wtextfield.c index f5f6e411..4752330b 100644 --- a/WINGs/wtextfield.c +++ b/WINGs/wtextfield.c @@ -1036,7 +1036,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event) case XK_Left: if (tPtr->cursorPosition > 0) { int i; -paintCursor(tPtr);
i = tPtr->cursorPosition; i += oneUTF8CharBackward(&tPtr->text[i], i); @@ -1052,9 +1051,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
if (tPtr->cursorPosition < tPtr->viewPosition) { tPtr->viewPosition = tPtr->cursorPosition; -refresh = 1; -} else -paintCursor(tPtr); +} +refresh = 1; } if (shifted) cancelSelection = 0; @@ -1077,7 +1075,6 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event) case XK_Right: if (tPtr->cursorPosition < tPtr->textLen) { int i; -paintCursor(tPtr);