[patch] Gtk2 TEdit/TMemo: fix text selection, make OnChange event compatible with LCL-Win32
Original Reporter info from Mantis: accorp @accorp
-
Reporter name:
Original Reporter info from Mantis: accorp @accorp
- Reporter name:
Description:
TEdit/TMemo controls from Gtk2 widgetset has number of issues making it imposible to write crossplatform code for text manipulation. See tests.
customedit.diff
* TCustomEdit: prevent OnChange event firing extra time when CharCase is ecLowerCase or ecUpperCase.
gtk2customedit.diff
gtk2custommemo.diff
* multiple changes to fix CaretPos, SelStart, SelLength, SelText and OnChange.
Steps to reproduce:
Install libxtst development package (required by MouseAndKeyInput)
Download, compile and run attached program. Select control (TEdit or TMemo), press Test button.
All tests is ok on LCL-Win32.
Additional information:
Tested on:
Windows 7 x86 gtk2-runtime-2.22.0, gtk2-runtime-2.24.10
Xubuntu 16.04 i686 gtk 2.24.30
Ubuntu 12.04 x86_64 gtk 2.24.10
Fedora 26 x86_64 gtk 2.24.31
This solves #23131 (closed), #24371 (closed) and #30596 (closed) for me.