View Issue Details

IDProjectCategoryView StatusLast Update
0015859LazarusLCLpublic2011-05-25 23:25
ReporterFlávio Etrusco (notifications not working)Assigned ToZeljan Rikalo 
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target Version0.9.30Fixed in Version0.9.30 
Summary0015859: gtk2 triggers erroneous LM_DEACTIVATE message
DescriptionI can't find anything wrong with the setup of the callback, but gtkFrmDeactivateAfter (, line 748) is being called for the widget getting focus!
Attached is patch adding debug messages to demonstrate the error.
It seems like a gtk bug, but it would nice someone more acknowledgeable on the LCL/gtk2 glue to take a look.
BTW, this causes an Application.Deactivate/Activate cycle every time we focus another form in the app, which defeats my intention to use Application.Activate to bring the IDE (app) windows to front ;)
TagsNo tags attached.
Fixed in Revision25478
Attached Files


Flávio Etrusco (notifications not working)

2010-03-25 04:00

developer   ~0036054

Last edited: 2010-03-30 00:21

Also, it would never work anyway. TForm always call Application.Deactivate while receiving LM_Deactivate, but it's still accounted by gtk as having focus.
Using the code from {$DEFINE EnableAsyncDeactivate} makes TApplication.Activate work.
Hooking the LM_Deactivate/focus-out into the 'after' signal didn't work too. The old active control is not focused, but the "perceived" newly focused widget doesn't belong to the app.
The 'focus-out' signal unfortunately doesn't pass the newly focused widget.

Zeljan Rikalo

2010-05-17 13:00

developer   ~0037675

Test and close if ok.

Issue History

Date Modified Username Field Change
2010-02-27 11:33 Flávio Etrusco (notifications not working) New Issue
2010-02-27 11:33 Flávio Etrusco (notifications not working) File Added: focus-out-debug.patch
2010-03-12 15:28 Vincent Snijders LazTarget => 1.0
2010-03-12 15:28 Vincent Snijders Status new => acknowledged
2010-03-12 15:28 Vincent Snijders Target Version => 1.0.0
2010-03-25 04:00 Flávio Etrusco (notifications not working) Note Added: 0036054
2010-03-25 04:01 Flávio Etrusco (notifications not working) File Deleted: focus-out-debug.patch
2010-03-30 00:21 Flávio Etrusco (notifications not working) Note Edited: 0036054
2010-05-17 13:00 Zeljan Rikalo Fixed in Revision => 25478
2010-05-17 13:00 Zeljan Rikalo Status acknowledged => resolved
2010-05-17 13:00 Zeljan Rikalo Resolution open => fixed
2010-05-17 13:00 Zeljan Rikalo Assigned To => Zeljan Rikalo
2010-05-17 13:00 Zeljan Rikalo Note Added: 0037675
2011-05-25 23:25 Flávio Etrusco (notifications not working) Status resolved => closed
2011-05-25 23:25 Flávio Etrusco (notifications not working) Fixed in Version => 0.9.30
2011-05-25 23:25 Flávio Etrusco (notifications not working) Target Version 1.0.0 => 0.9.30