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

Bernd prof7bit at googlemail.com
Mon May 21 15:28:27 CEST 2012

Has it always behaved this way? Currently if I invoke Identifier
completion with Ctrl+Space and the code tools encounter an error
because of a typo they fail to parse the code (often in immediate
reach of where I am currently typing, so I could easily reach it with
cursor keys) it will highlight the error and then focus the messages
window. Then I am always forced to use the mouse and click to focus

I am not sure if this has always been so (and haven't tested older
versions yet), It just seems to me that it only recently started to
annoy me big time. Consider this:

procedure TTor.KillIfAlreadyRunning;
  OldPid: THandle:
  PidFile: TFileSt   <-- cursor is here, pressing Ctrl+Space, want it
to autocomplete TFileStream

I have accidentally put : instead of ; after the THandle and now when
invoking Ctrl+Space in the last line it will complain, move the cursor
to the error right after THandle (which is perfectly ok because I need
to fix it exactly here) but then it will focus the message window and
I am interrupted in my typing, I have to take the hands off the
keyboard, find the mouse and give focus back to the source editor
window again (and if I hadn't focus follows mouse I would even have to
click exactly the correct location in order to not move the cursor
away from its already ideal position).

It would be nice if it would instead behave like this:
* print the error to the message window
* move the cursor in the source to the error
* (optional) bring the messages to the front (its often overlapped on
small screens) but do NOT change active focus in any way. Pulling away
the focus from under my fingers is not nice behavior.


Also the option (and functionality) to focus messages on compile
should be changed to only bring the message window to the front but
never change the focus. Is there actually any suitable use case where
one would really want the focus in the message window at all?

I often invoke the compiler with the keyboard shortcut only to see if
it still compiles (or if it compiles again after some heavy
refactoring) without wanting to leave the source editor, I only want
to see the message window, not interact with it. Currently the
behavior is quite strange:

"focus messages after compilation" unchecked:
* compiling without errors leaves the focus alone
* compiling with error focuses the message window (wrong! now I have
to use the mouse)

"focus messages after compilation" checked:
* compiling without errors focuses the messages
* compiling with error focuses the source. (exactly the opposite of
what it says)

I would like to have an option where it will simply always focus the
source, no matter what happens and maybe optionally bring the messages
to front if it is overlapped by other windows. I don't see any use in
messages ever having the focus, it does not provide any meaningful
keyboard interaction anyways.


More information about the Lazarus mailing list