Lazarus

Using the Lazarus IDE => Editor => Topic started by: Gerold_R on October 14, 2020, 07:26:49 pm

Title: Editor is loosing the focus
Post by: Gerold_R on October 14, 2020, 07:26:49 pm
Hello

I am switching from Windows to Linux (Mint) and Delphi 7 to Lazarus, so I am Lazarus beginner.

First I tried to setup Lazarus so that it feels a bit like my Delphi 7 config cause I am quite old and don't like changes anymore.

ALT-F9 is assigned to Quick-Compile but always when I press it to see if there are still some errors while converting a Delphi 7 project to Lazarus, the editor is not the active window anymore. It's the message window. How can I avoid this? It realy drives me crazy.

Same problem using Windows. If someone has an idea how to solve it at least under Windows, that would be fine.

Thanks for an answer.
Gerold
Title: Re: Editor is loosing the focus
Post by: Martin_fr on October 14, 2020, 07:38:01 pm
Menu: Tools > Options > Environment > Message Window
"Focus Msg win at compilation"
Title: Re: Editor is loosing the focus
Post by: Gerold_R on October 14, 2020, 11:52:22 pm
Thanks. Didn't see this option. Works at least when I use the keyboard not using the mouse.
Title: Re: Editor is loosing the focus
Post by: winni on October 15, 2020, 12:06:14 am
Hi!

If you click around nervous on your desktop while fpc compiles then a
different window will get the focus.

That is how the mouse works.

Winni
Title: Re: Editor is loosing the focus
Post by: Gerold_R on October 15, 2020, 07:49:41 am
If you click around nervous on your desktop while fpc compiles then a
different window will get the focus.

I dont click around nervous on my desktop. Just the quick compile button in the IDE coolbar.

The name of the option is
"Focus messages at compilation"
not
"Focus messages at compilation when your start the compile process using the keyboard"

So it seems to be a bug for me.

Title: Re: Editor is loosing the focus
Post by: Martin_fr on October 15, 2020, 12:46:49 pm
Are you sure focus goes to the message window, when you click the "run" button?

For me it goes to the ide-main bar (the window holding the menu and toolbar). This is normal. A mouse click moves focus.

I understand that does not help you. And one may argue that its not particular useful (the message window actually is useful, as some people navigate to the error messages by keyboard).
But useful or not, its the default behaviour, and (afaik) nothing else has ever been implemented (but I may be wrong, maybe it has, and is broken // Actually a very distant memory rings, that there may be cases where the IDE bar returns/restores focus, not sure what cases).

In any case, I would think it a reasonable feature if the run button (and other ide-main-window-toolbare-btn) would restore focus to the window that had focus before.

Maybe someone knows if it is a missing feature or broken feature (I suspect: missing).

In any case you could add a feature request (bug tracker / might sometimes be some long time until someone volunteers), or look into providing a patch.

----
One more note:
I do not know if you use Anchordocking with/without sparta-form..... (I don't, I also don't make to much use of the mouse / but those are personal choices).

Anchordocking is still somewhat newer, and has its own additional issue (though I tested this issue and this problem exists without AnchorDocking).
If you do you should mention this on a bug/feature report/request.

Afaik most of the core developers use floating windows. So AnchorDocking only gets fixed if bugs are reported.



Title: Re: Editor is loosing the focus
Post by: Gerold_R on October 17, 2020, 02:30:40 pm
Are you sure focus goes to the message window, when you click the "run" button?

You did not understand me. Sorry for my english. The topic is, "Editor is loosing the focus".

I have disabled the option:
Tools > Options > Environment > Message Window "Focus Msg win at compilation"

When the editor has the focus and I click on the Quick Compile" button in the toolbar, than the behaviour is not the same as when I press Alt-F9.

If there are still errors in the code, the editor remains the active window in both cases (mouse or keyboard used to quick compile)

If there are no more errors in the code and I use Alt-F9, the editor remains the active window, but NOT when I use the mouse.
At least right now, while I am working under Windows 7 to convert an old program.

But dont worry. I do not switch very often between mouse and keyboard and you gave me the hint with the "Focus Msg win at compilation" option. This helped me a lot and that was all I wanted. Thanks again.


For me it goes to the ide-main bar (the window holding the menu and toolbar). This is normal. A mouse click moves focus.

Well, depends on the program and how it is designed.

I do not know if you use Anchordocking with/without sparta-form..... (I don't, I also don't make to much use of the mouse / but those are personal choices).

Anchordocking is still somewhat newer, and has its own additional issue (though I tested this issue and this problem exists without AnchorDocking).
If you do you should mention this on a bug/feature report/request.

I never heard about it and I will have a look at it. What I dont like when using Lazarus under Linux Mint 20 Cinnamon is, after minimizing Lazarus I can not just restore Lazarus. I have to restore each Lazarus Window one by one.

Title: Re: Editor is loosing the focus
Post by: Sieben on October 17, 2020, 03:16:56 pm
Did you try Tools/Desktops...? It might get a bit confused on the z-order of windows but at least they restore.
Title: Re: Editor is loosing the focus
Post by: JuhaManninen on October 17, 2020, 05:17:23 pm
What I dont like when using Lazarus under Linux Mint 20 Cinnamon is, after minimizing Lazarus I can not just restore Lazarus. I have to restore each Lazarus Window one by one.
Options -> Environment -> Window -> Show single button in TaskBar
Title: Re: Editor is loosing the focus
Post by: lucamar on October 17, 2020, 06:47:49 pm
What I dont like when using Lazarus under Linux Mint 20 Cinnamon is, after minimizing Lazarus I can not just restore Lazarus. I have to restore each Lazarus Window one by one.

That's probably a "gimmick" of the window/desktop manager. Here, in various [Xu, Ku, U]buntu, it usually restores all windows except when you fiddle with individual ones like, say, restoring just the editor or message window and minimizing it again.

Using the option to which Juha's pointed is one option though I, personally, prefer to see all windows in the taskbar so that it's easier to select and manage each one. 
TinyPortal © 2005-2018