Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2018-01

IDE focused window after app terminates

10 messages · 5 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

I never noticed this before, but I'm working on a project where I switch very fast and frequently between coding and running the program, then back to coding... repeat.

The annoyance I never noticed before is that when my application terminates (run via F9 from within the IDE), the Main Window of Lazarus IDE always gets focus, instead of the Source Editor window. So this forces me to use the mouse to click the Source Editor window to get focus, before I can make my next small code change.

I'm using a 2-3 month old Lazarus Trunk (Lazarus 1.9.0 r55733 FPC 3.0.4 x86_64-freebsd-gtk2). Maybe I missed it, but does the IDE have an option to tell it to focus the Source Editor window instead of the Main IDE window after the debugged application terminates? If so, where is that option.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Ondrej Pokorny
to Graeme Geldenhuys
Graeme Geldenhuys wrote
The annoyance I never noticed before is that when my application terminates (run via F9 from within the IDE), the Main Window of Lazarus IDE always gets focus, instead of the Source Editor window.

Do you use a different debug desktop?

What OS/WS do you use?

I just tested on my Windows 10 and the focused window doesn't change (even on desktop change) when debugging ends. I.e. if I have my source editor focused, press F9, close debugged application, source editor stays focused.
If I run debugging from main IDE coolbar by pressing the run command button with mouse, I obviously change focus to main IDE window, the application is run, I close it, the main IDE window is focused.

Ondrej

Reply by email

Graeme Geldenhuys
to Ondrej Pokorny
Ondrej Pokorny wrote
Do you use a different debug desktop?

Do you mean as is "virtual desktop"? If so, no I don't. I have three monitors with centre monitor as my active development area.

What OS/WS do you use?

FreeBSD. I run a old-school style Window Manager, _not_ a desktop environment like KDE, MATE, Gnome etc. The Window Manager is called jwm (Joe's Window Manager), and it supports most (if not all) modern X11 window hints.

I try and use the mouse as little as possible while developing, so I use the F9 shortcut to run my application.

I also don't have any docking managers installed in Lazarus, so every IDE window is a separate window on screen.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Graeme Geldenhuys
to Graeme Geldenhuys
Graeme Geldenhuys wrote 6 lines
> What OS/WS do you use? FreeBSD. I run a old-school style Window Manager,_not_ a desktop environment like KDE, MATE, Gnome etc. The Window Manager is called jwm (Joe's Window Manager), and it supports most (if not all) modern X11 window hints.

I just switched to Gnome 3 desktop and the behaviour is exactly the same as under JWM. After my application terminates, the focus returns to the Main Window of Lazarus IDE, and not the last focused window, which was the Source Editor.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Ondrej Pokorny
to Graeme Geldenhuys: Do you mean as is "virtual desktop"? If so, no I don't. I have three monitors with centre…
Graeme Geldenhuys wrote
On 2018-01-28 05:35, Ondrej Pokorny via Lazarus wrote: > Do you use a different debug desktop? Do you mean as is "virtual desktop"? If so, no I don't.

No, I mean Lazarus debug desktop:
http://wiki.freepascal.org/IDE_Window:_Desktops

I have three monitors with centre monitor as my active development area.

I assume the number of monitors is irrelevant :)

Show quoted text 6 lines
> What OS/WS do you use? FreeBSD. I run a old-school style Window Manager, _not_ a desktop environment like KDE, MATE, Gnome etc. The Window Manager is called jwm (Joe's Window Manager), and it supports most (if not all) modern X11 window hints.

Strange why it happens if you don't use Lazarus desktops. You may try to debug the OnActivate event.

Ondrej

Reply by email

Graeme Geldenhuys
to Ondrej Pokorny
Ondrej Pokorny wrote
No, I mean Lazarus debug desktop: http://wiki.freepascal.org/IDE_Window:_Desktops

Seeing that I didn't know Lazarus IDE supports multiple desktop layout I guess I only use one.

Just had a look in the 'Manage desktops' dialog, and there is only one "default (active)" desktop defined.

Strange why it happens if you don't use Lazarus desktops. You may try to debug the OnActivate event.

OK, I'll give that a go.

Regards,
Graeme

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ My public PGP key: http://tinyurl.com/graeme-pgp

Reply by email

Vojtěch Čihák

Hi, my Linux+KDE (Plasma) experience:
 
I have no docking manager for Lazarus.
Source Editor (or Object Inspector or Messages etc.) is focused. I run app. using F9.
When app. active, I close it, by click to [X] or by Alt+F4. I can see Source Editor sometimes focused for a fraction of second (blink), but usually Main Winow is immediately focused.
 
V.

Reply by email

Donald Ziesig
to Graeme Geldenhuys: I never noticed this before, but I'm working on a project where I switch very fast and…
Graeme Geldenhuys wrote 21 lines
Hi, I never noticed this before, but I'm working on a project where I switch very fast and frequently between coding and running the program, then back to coding... repeat. The annoyance I never noticed before is that when my application terminates (run via F9 from within the IDE), the Main Window of Lazarus IDE always gets focus, instead of the Source Editor window. So this forces me to use the mouse to click the Source Editor window to get focus, before I can make my next small code change. I'm using a 2-3 month old Lazarus Trunk (Lazarus 1.9.0 r55733 FPC 3.0.4 x86_64-freebsd-gtk2). Maybe I missed it, but does the IDE have an option to tell it to focus the Source Editor window instead of the Main IDE window after the debugged application terminates? If so, where is that option. Regards,   Graeme

I have noticed a similar problem with Lazarus 1.8.0 that did not happen in earlier versions.  When I click on a tab in the Source Editor with the focus in an editor window, the focus switches somewhere not in the window I switched to.  IIRC it used to remember where the cursor and focus was for each window, but now I have to explicitly click on the selected editing surface (which changes the cursor position).

If I do an operation in another kind of window (e.g. the Object Inspector), then move the mouse back to the Source Editor, the cursor position and focus are restored correctly.

This is particularly annoying :-\

Regards,

Don Ziesig

Reply by email

Bart
to Donald Ziesig
Donald Ziesig wrote 6 lines
I have noticed a similar problem with Lazarus 1.8.0 that did not happen in earlier versions. When I click on a tab in the Source Editor with the focus in an editor window, the focus switches somewhere not in the window I switched to. IIRC it used to remember where the cursor and focus was for each window, but now I have to explicitly click on the selected editing surface (which changes the cursor position).

IIRC this was fixed some time ago.

Bart

Reply by email

Donald Ziesig
to Bart
Bart wrote 13 lines
On Sun, Jan 28, 2018 at 11:13 PM, Donald Ziesig via Lazarus wrote: > I have noticed a similar problem with Lazarus 1.8.0 that did not happen in > earlier versions. When I click on a tab in the Source Editor with the focus > in an editor window, the focus switches somewhere not in the window I > switched to. IIRC it used to remember where the cursor and focus was for > each window, but now I have to explicitly click on the selected editing > surface (which changes the cursor position). IIRC this was fixed some time ago. Bart

Thanks, I'll give it a try.

Reply by email