Position of window on startup

Report bugs, bug fixes and workarounds here.
Topic author
karnayna
Posts: 8
Joined: 10.10.2006
With us: 18 years 1 month

Position of window on startup

Post #1by karnayna » 10.10.2006, 23:58

(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

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #2by Malenfant » 11.10.2006, 00:28

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...
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Topic author
karnayna
Posts: 8
Joined: 10.10.2006
With us: 18 years 1 month

Post #3by karnayna » 11.10.2006, 00:41

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 :?

Starshipwright
Posts: 78
Joined: 08.08.2006
With us: 18 years 3 months

Post #4by Starshipwright » 11.10.2006, 00:46

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

Starshipwright
Posts: 78
Joined: 08.08.2006
With us: 18 years 3 months

Post #5by Starshipwright » 11.10.2006, 00:52

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.

Topic author
karnayna
Posts: 8
Joined: 10.10.2006
With us: 18 years 1 month

Post #6by karnayna » 11.10.2006, 01:09

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!

Starshipwright
Posts: 78
Joined: 08.08.2006
With us: 18 years 3 months

Post #7by Starshipwright » 11.10.2006, 01:17

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.

Malenfant
Posts: 1412
Joined: 24.08.2005
With us: 19 years 2 months

Post #8by Malenfant » 11.10.2006, 01:24

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.
My Celestia page: Spica system, planetary magnitudes script, updated demo.cel, Quad system

Topic author
karnayna
Posts: 8
Joined: 10.10.2006
With us: 18 years 1 month

Post #9by karnayna » 11.10.2006, 01:37

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...

abramson
Posts: 408
Joined: 22.07.2003
With us: 21 years 4 months
Location: Bariloche, Argentina

Window displacement bug

Post #10by abramson » 11.10.2006, 01:41

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

Johaen
Posts: 341
Joined: 14.01.2006
With us: 18 years 10 months
Location: IL, USA

Re: Window displacement bug

Post #11by Johaen » 11.10.2006, 01:58

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.
AMD Athlon X2 4400+; 2GB OCZ Platinum RAM; 320GB SATA HDD; NVidia EVGA GeForce 7900GT KO, PCI-e, 512MB, ForceWare ver. 163.71; Razer Barracuda AC-1 7.1 Gaming Soundcard; Abit AN8 32X motherboard; 600 watt Kingwin Mach1 PSU; Windows XP Media Center SP2;

Topic author
karnayna
Posts: 8
Joined: 10.10.2006
With us: 18 years 1 month

Post #12by karnayna » 11.10.2006, 02:07

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.

Starshipwright
Posts: 78
Joined: 08.08.2006
With us: 18 years 3 months

Post #13by Starshipwright » 11.10.2006, 02:22

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.

Avatar
selden
Developer
Posts: 10192
Joined: 04.09.2002
With us: 22 years 2 months
Location: NY, USA

Post #14by selden » 11.10.2006, 08:52

I've moved the thread to the Bugs forum.
Selden

Topic author
karnayna
Posts: 8
Joined: 10.10.2006
With us: 18 years 1 month

Post #15by karnayna » 12.10.2006, 09:18

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

Topic author
karnayna
Posts: 8
Joined: 10.10.2006
With us: 18 years 1 month

Post #16by karnayna » 12.10.2006, 09:33

Access violation vanished :oops: I'll try my fix now...


Return to “Bugs”