View Issue Details

IDProjectCategoryView StatusLast Update
0031900LazarusLCLpublic2017-10-13 16:06
ReporterRoger Olsson Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformLinuxOSDebian 
Product Version1.9 (SVN) 
Summary0031900: Order of events: TEdit / TListBox
DescriptionOn Windows, Lazarus and Delphi 7 behave the same. Except that Delphi 7 doesn't have the ListBox.SelectionChange event.

Problem is with Lazarus Linux GTK2. Events behave the *opposite* to Windows Lazarus and Delphi 7:

1) Edit.Exit fires AFTER ListBox.SelectionChange and ListBox.OnClick if selecting a different ListBox item than the currently selected one. Bad, it should behave like under Lazarus Windows so Edit.Exit fires first, before ListBox.SelectionChange and ListBox.OnClick

2) SelectionChange does not fire when clicking an already selected item. Good, shouldn't the Windows implementation also behave like this?

3) Edit.Exit fires BEFORE ListBox.OnClick if selecting an already selected ListBox item. Good. Same as Lazarus Windows and Delphi 7. Mention it just to point out the inconsistency within the same control.

Lazarus Win platform: Edit.Exit always fires first, before ListBox.OnClick (and OnSelectionChange), no matter if the ListBox item is selected or not. Good. Though I would not expect SelectionChange to fire in this case since there is no change in selection?
Steps To ReproduceRun demo, click Edit / ListBox
TagsNo tags attached.
Fixed in Revision55062
LazTarget-
WidgetsetGTK 2, GTK 3
Attached Files

Relationships

related to 0024308 closedZeljan Rikalo Copy/Paste content of TEdit (gtk2) in linux X11 by mouse middle button does not work 
related to 0032237 closedZeljan Rikalo SourceEditor: editor does not get focus when switching tabs 
related to 0032515 resolvedMichl GTK2: TPanel is ActiveControl 

Activities

Roger Olsson

2017-05-23 16:46

reporter  

OrderOfEvents.zip (2,458 bytes)

Zeljan Rikalo

2017-05-23 17:04

developer   ~0100626

Only Qt works as expected. Order of events is same as under win32 BUT qt does not trigger OnSelectionChanged() when already selected item is clicked. This is win32 bug, it should not send selectionChanged event if selection isn't changed, so I'll open an issue about it.
Gtk2 is definitelly wrong about order of events: OnSelectionChanged() OnClicked() EditExit() - totally wrong.

Zeljan Rikalo

2017-05-23 17:41

developer   ~0100627

Note that gtk3 also have same bug. That's because gtk2/3 sends focus message after mouse click and that's bad. Now, gtk2/gtk3 behaves same as qt and win32.
Please test it well, since I'll add it to the merge list for 1.8 (with waiting for feedback).

Roger Olsson

2017-05-23 22:50

reporter   ~0100640

Seems to work just fine, Zeljan. Tested under Linux/GTK2 and Windows. Thanks for resolving this old issue!

Roger Olsson

2017-05-24 01:12

reporter   ~0100641

Closed

Issue History

Date Modified Username Field Change
2017-05-23 16:46 Roger Olsson New Issue
2017-05-23 16:46 Roger Olsson File Added: OrderOfEvents.zip
2017-05-23 16:50 Zeljan Rikalo Assigned To => Zeljan Rikalo
2017-05-23 16:50 Zeljan Rikalo Status new => assigned
2017-05-23 17:04 Zeljan Rikalo LazTarget => -
2017-05-23 17:04 Zeljan Rikalo Note Added: 0100626
2017-05-23 17:04 Zeljan Rikalo Status assigned => confirmed
2017-05-23 17:27 Zeljan Rikalo Relationship added related to 0024308
2017-05-23 17:41 Zeljan Rikalo Fixed in Revision => 55062
2017-05-23 17:41 Zeljan Rikalo Widgetset GTK 2 => GTK 2, GTK 3
2017-05-23 17:41 Zeljan Rikalo Note Added: 0100627
2017-05-23 17:41 Zeljan Rikalo Status confirmed => resolved
2017-05-23 17:41 Zeljan Rikalo Resolution open => fixed
2017-05-23 22:50 Roger Olsson Note Added: 0100640
2017-05-24 01:12 Roger Olsson Note Added: 0100641
2017-05-24 01:12 Roger Olsson Status resolved => closed
2017-08-04 16:10 Bart Broersma Relationship added related to 0032237
2017-10-13 16:06 Michl Relationship added related to 0032515