wxWidgets / wxWidgets

Cross-Platform C++ GUI Library
https://www.wxwidgets.org/
5.77k stars 1.7k forks source link

Fix wxTE_PROCESS_ENTER in wxGTK comboboxes with autocomplete #24489

Closed vadz closed 3 weeks ago

vadz commented 3 weeks ago

This style was reset and never re-enabled because the comboboxes get multiple grab-notify notifications, unlike text controls, which only get one.

Fix this by adding a counter of the number of times grab-notify was called indicating that the popup was shown or hidden and only update the style when its status actually effectively changes.

Also use a more clear name for the function called when the popup is shown as having a Toggle(bool toggle) function was a bit confusing.

Closes #24394.


@AliKet Please let me know if you have any comments as this code was originally written by you.

AliKet commented 3 weeks ago

I didn't test this but the changes looks good to me, thanks.

Carnildo commented 3 weeks ago

Works in my testing: fixes comboboxes, and doesn't break text boxes.