View Issue Details

IDProjectCategoryView StatusLast Update
0019069LazarusLCLpublic2012-03-21 16:08
ReporterAntonAssigned ToPaul Ishenin 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.30.1 (SVN)Product Build 
Target VersionFixed in Version0.9.31 (SVN) 
Summary0019069: Wrong modal form behavior in windows
DescriptionAfter returning to application with activated modal form this form must be brought to front. In case of LCL ShowModal() it is not so. The example of this is Lazarus IDE.
Steps to reproduce:
1. Start Lazarus and create new Application project
2. Go to "Options of project" dialog (menu Project|Project options or Shift+Ctrl+F11) - img01.png
3. Now you need another application to activate (e.g. FireFox)
4. Try to activate Lazarus again by clicking on its main form - img02.png
Unfortunately, Lazaru IDE will not activated, but when we try to activate it by clicking on it in the taskbar, it will.
Additional InformationIndex: lcl/include/customform.inc
===================================================================
--- lcl/include/customform.inc (revision 30146)
+++ lcl/include/customform.inc (working copy)
@@ -2672,6 +2672,7 @@
             a better way: }
           try
             WidgetSet.AppProcessMessages; // process all events
+ Show;
           except
             if Application.CaptureExceptions then
               Application.HandleException(Self)

will fix erroneous behavior, but it is not a solution, cause in GTK+ it is not needed. I can not test it in Qt because I don't have it.
TagsNo tags attached.
Fixed in Revision36182
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

has duplicate 0016929 resolvedJuha Manninen Cannot activate application by clicking on the background window when ShowModal is used on other window 

Activities

2011-04-03 13:36

 

img01.PNG (91,702 bytes)
img01.PNG (91,702 bytes)

2011-04-03 13:37

 

img02.PNG (101,801 bytes)
img02.PNG (101,801 bytes)

Zeljan Rikalo

2011-04-03 15:03

developer   ~0047120

qt works fine, and I don't like your patch. It could be win32 only problem, and adding your patch can easy produce a mess with others.

yang jixian

2011-04-03 15:20

developer   ~0047121

In my ide I set "Application.MainFormOnTaskbar := True; ", the problem did not appear.

Anton

2011-04-03 15:23

reporter   ~0047122

Last edited: 2011-04-03 15:36

Qt must be tested separately under windows and under linux.
Zeljan, indeed it is not a patch, it is only "direction".
yang, it really fixes the problem, but I'm not sure, that it can be applied for Lazarus main project.

Juha Manninen

2011-10-05 09:47

developer   ~0052541

Anton, your fix doesn't work even on Windows 7. It prevents any other application gaining focus.
How could it work for you?

Zeljan Rikalo

2011-10-05 10:21

developer   ~0052544

As I already mentioned, this patch isn't good, roots of problem are somewhere else inside win32 ws code, and I think it can be fixed there when application activate occurs, that it should bring to top modal windows.

Zeljan Rikalo

2012-03-17 18:04

developer   ~0057779

I think that Paul fixed this recently...please test with 0.9.31 >= 36116

Zeljan Rikalo

2012-03-17 20:35

developer   ~0057793

Can you test with recent trunk ?

Anton

2012-03-19 09:47

reporter   ~0057832

Lazarus 0.9.31 r36160M FPC 2.6.0 i386-win32-win32/win64
Microsoft Windows [Version 6.1.7601] (win7 HP x64 with disabled themes)
Issue still alive.

Paul Ishenin

2012-03-21 02:27

manager   ~0057862

Please test and close if ok.

Anton

2012-03-21 16:08

reporter   ~0057876

Now it works, great! Thank you!

Issue History

Date Modified Username Field Change
2011-04-03 13:36 Anton New Issue
2011-04-03 13:36 Anton File Added: img01.PNG
2011-04-03 13:36 Anton Widgetset => Win32/Win64
2011-04-03 13:37 Anton File Added: img02.PNG
2011-04-03 15:03 Zeljan Rikalo Note Added: 0047120
2011-04-03 15:20 yang jixian Note Added: 0047121
2011-04-03 15:23 Anton Note Added: 0047122
2011-04-03 15:36 Anton Note Edited: 0047122
2011-09-18 23:05 Juha Manninen Relationship added has duplicate 0016929
2011-10-04 15:56 Vincent Snijders LazTarget => 1.0
2011-10-04 15:56 Vincent Snijders Status new => acknowledged
2011-10-04 15:56 Vincent Snijders Target Version => 1.0.0
2011-10-04 15:59 Vincent Snijders LazTarget 1.0 => -
2011-10-04 15:59 Vincent Snijders Target Version 1.0.0 =>
2011-10-05 09:47 Juha Manninen Note Added: 0052541
2011-10-05 10:21 Zeljan Rikalo Note Added: 0052544
2012-03-17 18:04 Zeljan Rikalo Note Added: 0057779
2012-03-17 20:35 Zeljan Rikalo Note Added: 0057793
2012-03-17 20:35 Zeljan Rikalo Status acknowledged => feedback
2012-03-19 09:47 Anton Note Added: 0057832
2012-03-19 10:42 Zeljan Rikalo Status feedback => assigned
2012-03-19 10:42 Zeljan Rikalo Assigned To => Paul Ishenin
2012-03-21 02:27 Paul Ishenin Fixed in Revision => 36182
2012-03-21 02:27 Paul Ishenin Status assigned => resolved
2012-03-21 02:27 Paul Ishenin Fixed in Version => 0.9.31 (SVN)
2012-03-21 02:27 Paul Ishenin Resolution open => fixed
2012-03-21 02:27 Paul Ishenin Note Added: 0057862
2012-03-21 16:08 Anton Status resolved => closed
2012-03-21 16:08 Anton Note Added: 0057876