View Issue Details

IDProjectCategoryView StatusLast Update
0017558LazarusLCLpublic2011-12-01 11:24
ReporterMartin FriebeAssigned ToPaul Ishenin 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.29 (SVN)Product Build 
Target VersionFixed in Version0.9.29 (SVN) 
Summary0017558: SetFocus fails, if form is docked (regression)
DescriptionOpen the attached example.

It has 3 forms (2 visible at start-up)

There is a button, to open the 3rd form. The 3rd form closes itself if deactivated (if either form1 or form2 is clicked by the user)

If you close form3, by clicking form1, then form1 get's the focus (you can see the buttons focused, you can navigate the buttuns by using the cursor-left/right keys)

If the checkbox on form3 is checked, then the focus will be set to Form2.Edit1.

- open form3 with the button on form1
- click form1
=> focus goes to form1.button1 (correct)

- open form3 with the button on form1
- check the checkbox on form3
- click form1
=> focus goes to form2.edit1 (correct)

Now dock Form2 into Form1:
- open form3 with the button on form1
- click form1 (uncheck checkbox before)
=> focus goes to form1.button1 (correct)

- open form3 with the button on form1
- check the checkbox on form3
- click form1
=> focus goes to form1.button1 (BUG)
focus should go to form2.edit1 (in fact it goes for a tiny moment (you may see it flicker). But is then later moved to form1.button1)

Additional Information- Observed on windows vista (native)
- With QT on windows dragging is not possible(different bug 0017557),
  but with QT focus is not set to the edit, not even if the forms are not docked

- Not present on Windows Vista with GTK2 widgetset
- Not present on linux/gtk2
- Not tested on linux/qt or carbon
TagsNo tags attached.
Fixed in Revision27713
LazTarget0.9.30
WidgetsetWin32/Win64, QT
Attached Files

Relationships

related to 0017562 closedMartin Friebe GTK2: SetFocus is ignored in certain cases 

Activities

2010-10-06 19:21

 

docked_focus_bug.rar (3,451 bytes)

Martin Friebe

2010-10-06 19:34

manager   ~0041549

this worked fine under 0.9.28.2

Martin Friebe

2010-10-06 21:13

manager   ~0041553

This may be related to this GTK2 issue: 0017562, since it seems the focus is undone by other focus msgs which are executed deferred

Paul Ishenin

2010-10-15 07:13

manager   ~0041824

Please test and close if ok.

Issue History

Date Modified Username Field Change
2010-10-06 19:21 Martin Friebe New Issue
2010-10-06 19:21 Martin Friebe File Added: docked_focus_bug.rar
2010-10-06 19:21 Martin Friebe LazTarget => -
2010-10-06 19:21 Martin Friebe Widgetset => Win32/Win64, QT
2010-10-06 19:34 Martin Friebe LazTarget - => 0.9.30
2010-10-06 19:34 Martin Friebe Note Added: 0041549
2010-10-06 19:34 Martin Friebe Summary SetFocus fails, if form is docked => SetFocus fails, if form is docked (regression)
2010-10-06 21:13 Martin Friebe Note Added: 0041553
2010-10-06 21:13 Martin Friebe Relationship added related to 0017562
2010-10-15 07:13 Paul Ishenin Fixed in Revision => 27713
2010-10-15 07:13 Paul Ishenin Status new => resolved
2010-10-15 07:13 Paul Ishenin Fixed in Version => 0.9.29 (SVN)
2010-10-15 07:13 Paul Ishenin Resolution open => fixed
2010-10-15 07:13 Paul Ishenin Assigned To => Paul Ishenin
2010-10-15 07:13 Paul Ishenin Note Added: 0041824
2011-12-01 11:24 Marc Weustink Status resolved => closed