textfield: always re-acquire selection on double-click (fix Wayland paste→stale ownsSelection)
This commit is contained in:
parent
f2b4d25b81
commit
f054296eb1
|
|
@ -1541,12 +1541,13 @@ static void handleTextFieldActionEvents(WMEvent * event, void *data)
|
|||
}
|
||||
paintTextField(tPtr);
|
||||
|
||||
if (!tPtr->flags.ownsSelection) {
|
||||
tPtr->flags.ownsSelection =
|
||||
WMCreateSelectionHandler(tPtr->view,
|
||||
XA_PRIMARY,
|
||||
event->u.button.time, &selectionHandler, NULL);
|
||||
}
|
||||
/* Always re-acquire on double-click so fresh data is
|
||||
* pushed on Wayland (selectionLost never fires there).
|
||||
* Safe on X11 — re-claiming your own selection is a no-op. */
|
||||
tPtr->flags.ownsSelection =
|
||||
WMCreateSelectionHandler(tPtr->view,
|
||||
XA_PRIMARY,
|
||||
event->u.button.time, &selectionHandler, NULL);
|
||||
} else if (!tPtr->flags.secure && tPtr->selection.count != 0 && !tPtr->flags.ownsSelection) {
|
||||
tPtr->flags.ownsSelection =
|
||||
WMCreateSelectionHandler(tPtr->view,
|
||||
|
|
|
|||
Loading…
Reference in New Issue