View Issue Details

IDProjectCategoryView StatusLast Update
0037868LazarusLCLpublic2020-10-13 11:13
ReporterCudaText man_ Assigned ToZeljan Rikalo  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
OSubuntu 20 
Product Version2.1 (SVN) 
Summary0037868: gtk2, qt5: ApplicationProperties.OnActivate/OnDeactivate fired 3 times
DescriptionDemo shows that both events are fired 3 times, see listbox log, on clicking app, then desktop, then app.
https://github.com/Alexey-T/FreePascal-tests/tree/master/Application%20OnActivate
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK 2, QT, QT5
Attached Files

Relationships

related to 0037867 closedJuha Manninen gtk3: ApplicationProperties.OnActivate/OnDeactivate don't work 

Activities

Juha Manninen

2020-10-04 15:05

developer   ~0126081

Why can't you zip the example project here? Am I supposed to download it file by file separately?

CudaText man_

2020-10-04 17:19

reporter   ~0126084

Attached

Juha Manninen

2020-10-04 18:53

developer   ~0126085

Last edited: 2020-10-04 18:59

View 2 revisions

Here it works perfectly well.
OnActivate and OnDeactivate events are called once when the window gets / looses focus, with both GTK2 and QT5.
With GTK3 it doesn't work indeed.

Can it depend on desktop? I have KDE plasma.

CudaText man

2020-10-04 19:07

reporter   ~0126086

Last edited: 2020-10-04 19:07

View 2 revisions

Maybe. I have Ubuntu 20.04 x64 with defaults.

CudaText man_

2020-10-08 10:06

reporter   ~0126141

The fix for report:

on activating form: 3 events fired: Activate(1), Deactivate(2), Activate(3).
on deactivating: 3 events again: Deactivate, Activate, Deactivate.

Juha Manninen

2020-10-08 13:03

developer   ~0126144

Could it be related to 0037853 then?

Zeljan Rikalo

2020-10-13 11:13

developer   ~0126276

This happens only under metacity (and metacity like) window managers. I'll try to fix it somehow, but there's no guarantee that it'll work correct on all window managers.

Issue History

Date Modified Username Field Change
2020-10-04 13:21 CudaText man_ New Issue
2020-10-04 15:05 Juha Manninen Note Added: 0126081
2020-10-04 15:11 Juha Manninen Relationship added related to 0037867
2020-10-04 17:19 CudaText man_ Note Added: 0126084
2020-10-04 17:19 CudaText man_ File Added: Application OnActivate.zip
2020-10-04 18:53 Juha Manninen Note Added: 0126085
2020-10-04 18:59 Juha Manninen Note Edited: 0126085 View Revisions
2020-10-04 19:07 CudaText man Note Added: 0126086
2020-10-04 19:07 CudaText man Note Edited: 0126086 View Revisions
2020-10-08 10:06 CudaText man_ Note Added: 0126141
2020-10-08 13:03 Juha Manninen Note Added: 0126144
2020-10-13 11:11 Zeljan Rikalo Assigned To => Zeljan Rikalo
2020-10-13 11:11 Zeljan Rikalo Status new => assigned
2020-10-13 11:13 Zeljan Rikalo Note Added: 0126276