Recent

Author Topic: Windows lost  (Read 1995 times)

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1315
Windows lost
« on: June 13, 2023, 12:14:38 pm »
Both the form designer and the build executable are not visible anymore. They were yesterday, albeit on a different monitor configuration. I restarted my computer, but that didn't help. I found the "Center a lost window" menu option, which would be really useful, if it would work, but it doesn't.

How can I debug this?

This is with a fpcupdeluxe trunk on Windows 10 64-bit.


paweld

  • Hero Member
  • *****
  • Posts: 1525
Re: Windows lost
« Reply #1 on: June 13, 2023, 12:35:23 pm »
in the environmentoptions.xml configuration file are stored windows parameters (visibility, position, size).
On Windows, the file is located by default in %appdata%\lazarus
Best regards / Pozdrawiam
paweld

dsiders

  • Hero Member
  • *****
  • Posts: 1496
Re: Windows lost
« Reply #2 on: June 13, 2023, 09:30:09 pm »
Both the form designer and the build executable are not visible anymore. They were yesterday, albeit on a different monitor configuration. I restarted my computer, but that didn't help. I found the "Center a lost window" menu option, which would be really useful, if it would work, but it doesn't.

How can I debug this?

This is with a fpcupdeluxe trunk on Windows 10 64-bit.

Did you try the Window > Center a lost window menu?
Preview the next Lazarus documentation release at: https://dsiders.gitlab.io/lazdocsnext

Peter H

  • Sr. Member
  • ****
  • Posts: 272
Re: Windows lost
« Reply #3 on: June 13, 2023, 10:23:13 pm »
I had this problem recently with the inbuilt chm help.
It did not open anymore, but was visible in the taskbar.
The point is, I use two monitors, but I switch the second monitor off in Windows, by [Windows key+P], when I do not need it.

Lets assume the help is on second monitor and you close the Lazarus IDE.
When you close Lazarus, it stores the window positions and sizes and remembers it on re-start.

Then you disable the second monitor.
Then you open the Lazarus IDE again and press F1.
Then Lazarus will try to open help on a yet nonexistent monitor and in a desktop region, that does not exist.
Then you see the Window in the taskbar, but it will not open. "Center lost Window" will not help, because Lazarus does not know, the desktop was reduced in size and because the window hangs and was not really opened.
I believe, this can happen with other windows too.

Activate and switch on all monitors you have. Possibly this solves the problem.
« Last Edit: June 13, 2023, 10:53:02 pm by Peter H »

BeniBela

  • Hero Member
  • *****
  • Posts: 948
    • homepage
Re: Windows lost
« Reply #4 on: June 13, 2023, 10:52:57 pm »
Linux would not have gotten lost so easily

Peter H

  • Sr. Member
  • ****
  • Posts: 272
Re: Windows lost
« Reply #5 on: June 13, 2023, 10:56:59 pm »
Linux would not have gotten lost so easily
It might have other, but similar issues with this problem.
Years ago I have used Linux exclusively, but nowadays I need the vendor supplied software for my (Olympus) camera and DxO Photolab, because it is calibrated for my camera and all my lenses, and this is the reason why I use windows.
(This started, when the GPL became so restrictive, that proprietary driver and software and codecs became unavailable and the distribution I used, was discontinued)

In windows, if you have multiple monitors, these all display the same, but enlarged desktop. (This can be different if you use a special graphics driver, but I dont)

In Linux this is different. What I remember from Linux, if X-Window crashes, then all GUI Applications crash. This is different in Windows. ;-)
« Last Edit: June 13, 2023, 11:42:05 pm by Peter H »

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1315
Re: Windows lost
« Reply #6 on: June 14, 2023, 09:10:02 am »
I checked all settings and compared projects. It's just a single project, the one I'm working on. Cascading windows doesn't work.

I cannot turn on all monitors, as I have 3 at work and 2 at home (although a larger one). I do know, that the first time I run Lazarus on a different set of monitors, the windows are dispersed across all of them.  I manually have to collect and place them, assuming I can grab onto them.

I tried to debug it, but while the code enters the TApplication.RunLoop, if I press Alt-Tab, the window is still blank. Shift-RightClick doesn't give an option to move it, just minimize and close. Selecting it with Alt-Tab and pressing WindowsKey-Left doesn't show it either. (Then again, I turned off everything related to autosizing and snapping windows, as that drives me crazy.) The same happens when I run it outside Lazarus, even from an administrative PowerShell. And I used it at work without problems, although I cannot remember on what monitor it was.

And, as said, it isn't only the application itself, but also the form editor.

It's a problem.

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1315
Re: Windows lost
« Reply #7 on: June 14, 2023, 10:15:24 am »
Well, ok, it wasn't so hard after all. I changed the "Left" and "Top" of the window multiple times, and after a few tries it appeared again :)

I think there are two problems: you can arrange your screens in multiple ways, and the top left of the top left window doesn't have to be 0,0. Next to that, if the form is off the screen, the OnPaint isn't called, so it doesn't really exists.

Still, a test to move them back on the screen if invisible, and/or fixing the "Center a lost window" menu item would be welcome.

 

TinyPortal © 2005-2018