[Lazarus] usability: please not focus the messages window, only bring to front

Bernd prof7bit at googlemail.com
Mon May 21 17:41:06 CEST 2012


There must be some explicit SetFocus() calls hidden somewhere deep
inside the code. I don't know where exactly the code is located that

* writes the compiler error messages and then (sometimes) sets focus
* writes the code tools errors and then (sometimes) sets focus

I would have to figure out how to trace it back with the debugger
somehow if I figure out where to set the breakpoint (would a
breakpoint in in TMessagesView.FormActivate() give me a useful stack
trace?), maybe I have to grep the entire code for SetFocus().

Now out of sheer desperation I have patched my local copy as follows:

in msgview.pp for the event OnActivate:

procedure TMessagesView.FormActivate(Sender: TObject);
begin
  SourceEditorManagerIntf.ActiveSourceWindow.SetFocus;
end;

Now the message window cannot have the focus anymore at all, it will
immediately focus back to the source editor whenever something
activates it but this unknown "something" in the code that is doing
this is the real root of the evil, I need to find it.

Bernd




More information about the Lazarus mailing list