View Issue Details

IDProjectCategoryView StatusLast Update
0012020PatchesIDEpublic2011-12-01 11:23
ReporterAttila Borka Assigned ToMattias Gaertner  
Status closedResolutionfixed 
Product Version0.9.25 (SVN) 
Target Version1.0.0 
Summary0012020: If "Show compile dialog" is active, the focus is put to the messages window when the compilation done
DescriptionThe compilation dialog seems to be not modal (only stay on top) so we can click behind it and continue editing the source code, etc.

After the compilation is done, the focus should be on the compilation dialog and not on the "Messages" window. The messages window should get the focus only when the compilation dialog is closed.

Also, the compilation dialog always shows more than zero hints in its counter, even when there is nothing listed in the messages window (with Show hints turned on).
Tagshas_patch, patch
Fixed in Revision
Attached Files


has duplicate 0016157 closedMarc Weustink Lazarus IDE freezes during debug when compile dialog is shown 
related to 0015494 closedPaul Ishenin Lazarus Trouble with focus 
related to 0014294 closedMartin Friebe Lazarus Stop debug with ctrl-F2, moves focus away from Editor 
related to 0014789 resolvedPaul Ishenin Lazarus Patch: Focus lost when execution stops 


Attila Borka

2008-09-05 22:34

reporter   ~0022019

Also, this behavior is the same when starting a program with F9, or when running a program till a breakpoint, etc.
The compiler progress dialog just stays there until closed by clicking on the OK.
Nothing should happen until one closes it (no executing a program or entering debugging mode, focusing on other windows or anything)

Flávio Etrusco

2009-05-09 23:09

reporter   ~0027464

Don't you think that when starting the program with F9 the dialog should be closed/dismissed as soon as the debugger starts?

Flávio Etrusco

2009-05-09 23:16

reporter   ~0027465

A fix for the main (but not more serious) issue could be simply change in $(laz_dir)/ide/main.pp, line 9569:
          DoJumpToCompilerMessage(-1, not ShowCompileDialog);

Attila Borka

2010-03-11 03:29

reporter   ~0035221


Currently, if you have the dialog enabled and start to debug a program, when you finish the debugging session and return to Lazarus, the whole IDE becomes unresponsive because the compiler progress window is still there - nobody closed it - with a much smaller dialog behind it - that is not visible of course - saying Debugger: "Execution stopped".

Unless the developer presses the Enter key blindly - closing this smaller dialog - you cannot do anything with Lazarus. It does not let you click anywhere and do anything. The compiler progress dialog is not clickable, not moveable, etc. because this smaller dialog has the focus and it is modal.

Flávio Etrusco

2010-03-11 03:43

reporter   ~0035222

So the problem is actually that ShowModal doesn't - but should - have higher Z priority than StayOnTop forms. This together the "show message on terminate" debugger option, which I always disable...

Flávio Etrusco

2010-03-11 18:13

reporter   ~0035278

But thinking again, none of these (focusing the Message View and the hidden modal form) would be a problem if the Compilation Dialog was closed after compilation, like Delphi. Don't you think it's a better behavior anyway? If you also think so, I'll ask the list for comments.

Attila Borka

2010-03-11 22:05

reporter   ~0035296

Last edited: 2010-03-11 22:07

I'd say if Delphi removes that window automatically when a debug/execution starts, then so should Lazarus.
I was under the impression that is not the case, but I can be wrong.... the last Delphi I used was D5 :)

But there is still the issue of where the focus goes after a compilation with that window still up (if it is not a debug/execution session that starts).
The focus should be on this compiler progress window, not in the messages or source code window, so we can close it with an 'enter'.

2010-03-18 04:31


Flávio Etrusco

2010-03-18 04:34

reporter   ~0035740

Last edited: 2010-03-18 04:36

The attached patch does 2 things:
1) avoids moving focus to the MessageView on compile error ir ShowCompilerProgress is enabled (keeps the focus in CompilerProgress dialog, which makes it practical to close and avoid modifying the editor by mistake).
2) calls CompilerProgress.Hide when the debugger starts.

Attila Borka

2010-03-19 20:20

reporter   ~0035813

Better with the patch, but when I close the compiler progress window, the focus is lost.
If there was an error it should go to the messages window, if there wasn't, it should go back to the source code window. Or something similar.

Also, if there is an error, the compiler progress window does not have the focus after compilation now, and cannot be closed with an enter.
But after closing it (with mouse for example), the focus is lost.

Issue History

Date Modified Username Field Change
2008-09-01 06:17 Attila Borka New Issue
2008-09-01 06:17 Attila Borka Widgetset => Win32
2008-09-01 09:28 Vincent Snijders LazTarget => 1.0
2008-09-01 09:28 Vincent Snijders Status new => acknowledged
2008-09-01 09:28 Vincent Snijders Target Version => 1.0.0
2008-09-05 22:34 Attila Borka Note Added: 0022019
2009-05-09 23:09 Flávio Etrusco Note Added: 0027464
2009-05-09 23:16 Flávio Etrusco Note Added: 0027465
2010-01-23 10:42 Dmitry Boyarintsev Relationship added related to 0015494
2010-03-11 03:29 Attila Borka Note Added: 0035221
2010-03-11 03:43 Flávio Etrusco Note Added: 0035222
2010-03-11 18:13 Flávio Etrusco Note Added: 0035278
2010-03-11 22:05 Attila Borka Note Added: 0035296
2010-03-11 22:07 Attila Borka Note Edited: 0035296
2010-03-18 04:31 Flávio Etrusco File Added: compiler-progress-focus.svndiff
2010-03-18 04:32 Flávio Etrusco Project Lazarus => Patches
2010-03-18 04:34 Flávio Etrusco Note Added: 0035740
2010-03-18 04:36 Flávio Etrusco Note Edited: 0035740
2010-03-19 20:20 Attila Borka Note Added: 0035813
2010-03-30 10:56 Flávio Etrusco Tag Attached: has_patch
2010-03-30 10:56 Flávio Etrusco Tag Attached: patch
2010-03-30 10:57 Flávio Etrusco Relationship added related to 0014294
2010-03-31 23:53 Marc Weustink Relationship added has duplicate 0016157
2010-04-17 20:51 Mattias Gaertner Assigned To => Mattias Gaertner
2010-04-17 20:51 Mattias Gaertner Status acknowledged => resolved
2010-04-17 20:51 Mattias Gaertner Resolution open => fixed
2011-11-14 22:04 Juha Manninen Relationship added related to 0014789
2011-12-01 11:23 Marc Weustink Status resolved => closed