Page 1 of 1

Position of window on startup

Posted: 10.10.2006, 23:58
by karnayna
(This might be a double post...)
Hello everybody!

I am with Celestia for just 2 days and I am absolutely convinced! It's great! I read this and that thread in the forum (i.e. about those great days when discussions about atmosphere colors were on...) and feel like I might have missed the best part: the evolution of the basics... (sigh)

Although we, hrrm, you made it to version 1.4.1 already I have a minor problem on my WinXP system: I have my taskbar on the upper edge of the desktop (so it's near to the window's menus what makes sense, I feel). Celestia takes the taskbar's size into account when starting, but does not care for it's current position. That leads to a taskbar's size space unoccupied on the lower edge of the screen, and Celestia's window's top hidden under the taskbar.

Any ideas?

Thanks in advance
karnayna

Posted: 11.10.2006, 00:28
by Malenfant
I presume this is only when it's maximised? If so, an obvious solution would be to not have it maximised, but instead manually resize it so it doesn't try to fill the whole screen...

Posted: 11.10.2006, 00:41
by karnayna
False presumption. The Y-Position is always incorrect: with the next start, the Celestia window opens at the correct horizontal position, but in vertical direction the size of taskbar is added: if I drag the taskbar larger, the deviation increases. With starting and closing Celestia, sooner or later I will have that same problem :?

Posted: 11.10.2006, 00:46
by Starshipwright
Karnaya, there is a very easy way to solve that problem. Just move the Celestia window down by dragging it to the bottom of the screen. Celestia will remember it's last settings when it is closed, so the next time you open it the window should be in the same place. Just keep that setting and it should be fine. If that does not work you can resize the Celestia window to make everything visible and it will reopen in the same position and size, although you may be unable to use the taskbar sized area at the bottom of the screen.

Remember that you can resize the Celestia window to any size and use the View options to switch between seeing Clestia in a window and seeing Celestia full screen at a number of different settings. Check out the user manual for more information on View options. You can find it at the Celestial Motherlode in the Documentaion section. Here is the link:

http://www.celestiamotherlode.net/catalog/documentation.html

Posted: 11.10.2006, 00:52
by Starshipwright
I guess I was posting at the same time as Malenfant. I think that my second suggestion will work for you. Just resize the Celestia window to any convienent size, it does not matter what size, and use the Alt+enter to toggle between window and full screen mode in Celstia. Again, you can get all the information about this in the users guide.

Posted: 11.10.2006, 01:09
by karnayna
Starshipwright, you are right: the position is restored on startup, but only when the taskbar is in its default position on the lower edge of the desktop! Put in on the upper one, and none of your hints will work. Instead, the window moves upward with every start of Celestia, and finally is hidden behind the taskbar. The larger the taskbar, the faster the window moves: One taskbar size per start. So I'm sorry: Celestia does not open in the same position, that exactly is my problem.
BTW: I already read the doc, and I do not have a problem with Celestia's display or rendering options. It's the mere window positioning that does not work...

Nevertheless: thanks for your time!

Posted: 11.10.2006, 01:17
by Starshipwright
My thought was that if you set the Celestia window small, not the size that you want to view it at so that it doesn't cover the toolbar and the moved to full screen mode to use Celestia you could toggle between them to be able to access your toolbar if you need to while you are running Celestia.

In other words, do not try to have the Celestia window fill the screen but rather use the Full Screen view mode to do that while you are using the program.

If it is just that Celestia's menu bar is covered there are keyboard shortcuts for almost all of the functions on the toolbar, and even some functions that are not.

Posted: 11.10.2006, 01:24
by Malenfant
Hm. Actually I can verify this. I moved my taskbar to the top of the screen, opened Celestia in windowed mode, and then moved it to near the top of the screen. Then I shut it down, and reopened it... and when it started up again it had moved up a bit. It keeps moving up everytime it's opened, til the titlebar is behind the taskbar, at which point you can't move it without hitting "Alt" and then selecting the Move option.

This doesn't happen if the task bar is at the bottom or sides of the screen - only when it's at the top.

I noticed this happens with my old Paint Shop Pro 5 too, but not with Photoshop 7 or MS Word or Excel 2003. I wonder if newer programs have accounted for the taskbar being at the top, but older ones (or ones with old positioning code) don't?

It is a real issue, anyway.

Posted: 11.10.2006, 01:37
by karnayna
Actually I can verify this.
Thanks!

It keeps moving up everytime it's opened, til the titlebar is behind the taskbar, at which point you can't move it without hitting "Alt" and then selecting the Move option.

That's what I said. Or tried to... But if you simply resize the window, it pops down a bit, just far enough to catch the title bar with the mouse and drag it.

I just remember, I had the same problem years ago with an application I wrote. It in fact was a coding problem. Let me check my archives. Back soon...

Window displacement bug

Posted: 11.10.2006, 01:41
by abramson
I confirm that what karnayna reports is correct.

If the taskbar is at the top edge, Celestia will not remember its vertical position, and each new run will result in its window displaced upward an amount equal to the heigth of the taskbar.

Moreover, if the taskbar is at the left edge, Celestia's window will be displaced leftward on each run, by an amount equal to the width of the taskbar.

With the taskbar on the right, nothing strange happens, as well as with the taskbar at its default bottom setting (as everybody knows), and also after repositioning Celestia's window (the displacement is from the position at closing).

These effects occur either with a "locked" or "unlocked" taskbar, and with Celestia 1.4.1 or with a CVS version compiled by myself.

I suggest that this thread is moved to the Bugs forum. 8O

By the way, I have never seen anyone using a taskbar on the sides of the display. Have you? The top, though, seems to me a reasonable choice.

Regards,

Guillermo

OS: XP Home SP2

Re: Window displacement bug

Posted: 11.10.2006, 01:58
by Johaen
abramson wrote:By the way, I have never seen anyone using a taskbar on the sides of the display. Have you? The top, though, seems to me a reasonable choice.


I know one of the guys I work with has his taskbar on the right side of the screen, and then his 2nd monitor to the right of that. Not sure why he does it. I can't stand having it anywhere but the bottom, and one row tall.

Posted: 11.10.2006, 02:07
by karnayna
Back again. I found the source, and the solution is easy: I tried using MoveWindow() to code the positioning myself instead of using the WinAPI functions Get- and SetWindowPlacement(). They do what I excpected, and so I buried the code deep inside one of my general libraries and never thought of that problem again...

What to do next? I did not yet get the code and so do not know whether it compiles here...

And yes, one of my colleagues hat the taskbar on the left. Maybe because there is more room for more of those application buttons.

Posted: 11.10.2006, 02:22
by Starshipwright
If you are able to solve this problem by means of a coding fix, please let chris or one of the other developers know so that it can be incorporated into the regular program code. Sorry that I was unable to help.

Posted: 11.10.2006, 08:52
by selden
I've moved the thread to the Bugs forum.

Posted: 12.10.2006, 09:18
by karnayna
Downloaded source from CVS OK, compiled OK, but I get an Access violation during initial load of my exe. 8O

I'm sorry, but I don't have the time to look into that, so someone else has to fix the "Wand'ring Window".

Have fun

Posted: 12.10.2006, 09:33
by karnayna
Access violation vanished :oops: I'll try my fix now...