Thread View: news.software.readers
10 messages
10 total messages
Started by zziffle
Fri, 15 Sep 2006 23:11
Xnews Metrics Bug
Author: zziffle
Date: Fri, 15 Sep 2006 23:11
Date: Fri, 15 Sep 2006 23:11
18 lines
1949 bytes
1949 bytes
Ah hah! I've finally figured out what's going on with a persistent (all versions) metrics bug in xnews. Periodically, when windowed, its display area would vanish to somewhere off screen. Closing and re-opening wouldn't help - it would just open up somewhere in Invisible Land. I found the fix was to delete the [Metrics] section from xnews.ini and let it default itself somewhere onto the screen. Here's what's messing up the metrics in my case. I've got my xp toolbar up at the top of the screen. Everytime I close xnews when it's windowed, it comes back up on the screen exactly a toolbar width higher than it was when it closed. Eventually this means the metrics record the top as being above the screen top, and when this happens, nothing displays. Hence the fix of deleting the recorded metrics. This creeping screen location thing doesn't happen with the xp toolbar down in it's usual screen-bottom location. I hope the all powerful Luu gets wind of this so he can sneak a fix in. Cheers...
Re: Xnews Metrics Bug
Author: Mike Yetto
Date: Sat, 16 Sep 2006 03:12
Date: Sat, 16 Sep 2006 03:12
16 lines
1679 bytes
1679 bytes
There I was, minding my own business, when
zziffle wrote...
> I hope the all powerful Luu gets wind of this so he can sneak a
> fix in.
This behaviour has been evident in almost every version of Windows
(back to DOS in a clown suit) with many many applications. If Luu
can fix it, good on him.
Mike "somewhere off his own window" Yetto
--
"There is danger from all men. The only maxim of a free
government ought to be to trust no man living with power to
endanger the public liberty."
- John Adams
Re: Xnews Metrics Bug
Author: zziffle
Date: Sat, 16 Sep 2006 04:18
Date: Sat, 16 Sep 2006 04:18
38 lines
3052 bytes
3052 bytes
Mike Yetto <mike.yetto@nycap.invalid> wrote in news:Xns983FEC2817E21uniquelyme@tomate.motzarella.org: > > This behaviour has been evident in almost every version of Windows > (back to DOS in a clown suit) with many many applications. If Luu > can fix it, good on him. > Ah, such a spirit of defeatism haunts our youth these days. Sure there's probably a few other apps that exhibit this behaviour. Not many. None other than xnews on my system at the moment. But it actually is really easy to fix the code. I forget the gory details right now, but there are a couple of different windoze system calls for getting screen pixel locations relative to the edges. One set of calls references the entire screen and another references the available desktop real estate. The difference is just about always the task bar. XNews is reading/storing the top of the window position with the system calls that are relative to the available desktop. But at initialization it is restoring the top position relative to the screen area, hence up a taskbar width. This behaviour goes unnoticed in testing with the task bar down at the bottom because then desktop top and screen top are the same. The fix is simple: adjust the calls so that the save and restore are both using the same coordinate reference - either screen or desktop (properly, desktop), but don't write in one and read it back like the other. XNews is written in Delphi I do believe. Now, if this problem of mixing up coordinate systems is entrenched in the Delphi libraries, the fix is a bit more challenging and involves making calls to detect the discrepency and adjusting the values written to the ini file. You'd need to check horizontally as well for those odd balls who have their task bar on the left. For completeness, if it was my baby, I'd also do a sanity check on the ini metrics at startup and if they point to somewhere out in lala land, ignore them and go with defaults. Adidas...
Re: Xnews Metrics Bug
Author: zziffle
Date: Sat, 16 Sep 2006 04:28
Date: Sat, 16 Sep 2006 04:28
10 lines
1692 bytes
1692 bytes
Oh oh, now I'm talking to myself and replying to my own postings. Not good. There's another thread discussing this bug too. Check out the "Xnews Minimized - won't max" started by Donna. It reminds me, the problem sometimes occurs when returning from minimized for me too, and the screen creep does not happen in these instances. So although the screen creep is likely one cause of the problem, it appears there are other circumstances where the metrics get hosed. There appears to be more to it than just adjusting which reference coordinates are being used.
Re: Xnews Metrics Bug
Author: Mike Yetto
Date: Sat, 16 Sep 2006 13:43
Date: Sat, 16 Sep 2006 13:43
63 lines
4090 bytes
4090 bytes
There I was, minding my own business, when
zziffle wrote...
> Ah, such a spirit of defeatism haunts our youth these days.
>
Bite me little one.
> Sure there's probably a few other apps that exhibit this
> behaviour. Not many.
Many. This phenomenon has been seen on many desktop interfaces,
including Presentation Manager on OS/2. The OS looses track of a
window position and sticks it somewhere "over there" until the
position information is deleted and a default location and size is
used by the OS.
> None other than xnews on my system at the
> moment. But it actually is really easy to fix the code.
Until you've seen the code you have no idea how easy or hard it would
be to fix it. I've heard this many times from someone who just
learned a little and thereby knows all.
> I forget the gory details right now, but there are a couple of
> different windoze system calls for getting screen pixel
> locations relative to the edges. One set of calls references
> the entire screen and another references the available desktop
> real estate. The difference is just about always the task bar.
> XNews is reading/storing the top of the window position with the
> system calls that are relative to the available desktop. But at
> initialization it is restoring the top position relative to the
> screen area, hence up a taskbar width. This behaviour goes
> unnoticed in testing with the task bar down at the bottom
> because then desktop top and screen top are the same. The fix
> is simple: adjust the calls so that the save and restore are
> both using the same coordinate reference - either screen or
> desktop (properly, desktop), but don't write in one and read it
> back like the other.
>
> XNews is written in Delphi I do believe. Now, if this problem
> of mixing up coordinate systems is entrenched in the Delphi
> libraries, the fix is a bit more challenging and involves making
> calls to detect the discrepency and adjusting the values written
> to the ini file. You'd need to check horizontally as well for
> those odd balls who have their task bar on the left. For
> completeness, if it was my baby, I'd also do a sanity check on
> the ini metrics at startup and if they point to somewhere out in
> lala land, ignore them and go with defaults.
>
When your "baby" is complete let us know.
> Adidas...
>
Mike "New Balance to you" Yetto
--
"There is danger from all men. The only maxim of a free
government ought to be to trust no man living with power to
endanger the public liberty."
- John Adams
Re: Xnews Metrics Bug
Author: Dominik R.
Date: Sat, 16 Sep 2006 14:01
Date: Sat, 16 Sep 2006 14:01
32 lines
2248 bytes
2248 bytes
Dreaming zziffle woke me up by screaming news:Xns983FA4B2D1544azzifflepost@24.64.223.211: > Ah hah! I've finally figured out what's going on with a persistent > (all versions) metrics bug in xnews. > Periodically, when windowed, its display area would vanish to > somewhere off screen. Closing and re-opening wouldn't help - it would > just open up somewhere in Invisible Land. I found the fix was to > delete the [Metrics] section from xnews.ini and let it default itself > somewhere onto the screen. I've reported that ages ago. With ResHacker you can quickly "fix" this so that Xnews at least stays always on screen with adding "Position = poDesktopCenter" to the RCDATA "TXNEWSFRAME". To let the Editor Windows stay on screen I changed the same data on TEDITWINDOW (around line 40). As I'm applying new toolbar art and such to every new Xnews version that is not a big problem for me anymore. Anyway, it has been reported to Luu and I think he aknowledged it at sometime here. Search this group for that. This seems to be a popular problem with Delphi programs, at least one other (The Bat!) suffers from a mild case of this. -- Dom http://Beam.To/Dominik/ Yapp's Basic Fact: If a thing cannot be fitted into something smaller than itself, some dope will do it.
Re: Xnews Metrics Bug
Author: Bill Clark
Date: Sat, 16 Sep 2006 22:48
Date: Sat, 16 Sep 2006 22:48
20 lines
1971 bytes
1971 bytes
Mike Yetto <mike.yetto@nycap.invalid> wrote in news:Xns984062E506652uniquelyme@tomate.motzarella.org: > Many. This phenomenon has been seen on many desktop interfaces, > including Presentation Manager on OS/2. The OS looses track of a > window position and sticks it somewhere "over there" until the > position information is deleted and a default location and size is > used by the OS. Interesting... I've used OS/2 from 2.1 to 4.5 and don't remember ever seeing it... Since the local modem bank has improved things to break OS/2 and I've started using windows, Xnews is the only program that I have noticed this with... I avoid the problem be repositioning Xnews to where I want it each time I open it, and the next time it is opened at it usual default spot without creep... -- -bc-
Re: Xnews Metrics Bug
Author: zziffle
Date: Sun, 17 Sep 2006 20:32
Date: Sun, 17 Sep 2006 20:32
62 lines
3791 bytes
3791 bytes
Mike Yetto <mike.yetto@nycap.invalid> wrote in news:Xns984062E506652uniquelyme@tomate.motzarella.org: mike yetto wrote: > > Bite me little one. > > > Until you've seen the code you have no idea how easy or hard it would > be to fix it. I've heard this many times from someone who just > learned a little and thereby knows all. > > When your "baby" is complete let us know. > > > Mike "New Balance to you" Yetto Holy self-appointed vigilante newsgroup gatekeeper batman. This yetto fellow needs to lighten up a bit. Sorry Mike, but it's simply a fact that when a Windows application restores its position one taskbar width closer to the top or the left, it's because it is using mismatch postion store and restore calls. In particular, the app's postion is being retrieved with a call to GetWindowPlacement() but being set at startup by a call to SetWindowPos() rather than SetWindowPlacement(). And it's also simply a fact that it's pretty easy to change the mismatched call to a matched one (although they do take different arguments). If the call is in the xnews code, it's probably worth doing, imo. If this wrong call is being made from the libraries, then it's the Delphi teams problem. But really Mike, this isn't about you at all. My post is simply a bit of rather mundane information directed at xnews' author. If it's of no value or interest to him, great, no harm done. Your self-volunteered intervention services of dismissing the posting of this info based on your (mistaken) assumptions about my credentials adds nothing of interest or value. A couple of points of interest (at least to me): While poking around msdn to find the function call names in question for this reply, I found the following blog excerpt from one of Microsoft's interface developers. Turns out Microsoft originally wanted the taskbar at the top in Windows '95 but had to put it at the bottom because too many apps were misbehaving in the way we're talking about here. (Yes Mike, many in the 90s, not so many now.) http://blogs.msdn.com/oldnewthing/archive/2003/09/12/54896.aspx Finally, and more importantly, my orginal post was way out of whack in relating this screen creep/taskbar issue to the minimized-can't-restore metrics problem. I was way too hasty in trying to make that connection without any evidence. The two problems are not related and I can't initiate the failure to display or restore by letting xnews "creep" off the screen. This means, at least to me, that this creeping problem I've raised here is pretty trivial. Adidas baby...
Re: Xnews Metrics Bug
Author: zziffle
Date: Sun, 17 Sep 2006 20:43
Date: Sun, 17 Sep 2006 20:43
32 lines
2281 bytes
2281 bytes
"Dominik R." <lookin@the.header> wrote in news:Xns9840A309A3D38gigdrwhatever@140.99.99.130: Dominik sez: > > I've reported that ages ago. > With ResHacker you can quickly "fix" this so that Xnews at least stays > always on screen with adding "Position = poDesktopCenter" to the > RCDATA "TXNEWSFRAME". > To let the Editor Windows stay on screen I changed the same data on > TEDITWINDOW (around line 40). > As I'm applying new toolbar art and such to every new Xnews version > that is not a big problem for me anymore. > Anyway, it has been reported to Luu and I think he aknowledged it at > sometime here. Search this group for that. > > This seems to be a popular problem with Delphi programs, at least one > other (The Bat!) suffers from a mild case of this. > Thanks for the info Dominik. If it's popular behaviour with other Delphi programs, then it's in the libraries/framework. Best to learn to love it. The hack/fix I've come to use to work around it is to get xnews set up how I like it, copy xnews.ini to xnews.ini.bak and start xnews from a shortcut that runs cmd.exe /c "copy Xnews.ini.bak Xnews.ini & start xnews.exe". This stops both the screen creep and the failure to restore problems. Cheers...
Re: Xnews Metrics Bug
Author: Mike Yetto
Date: Mon, 18 Sep 2006 01:19
Date: Mon, 18 Sep 2006 01:19
17 lines
2190 bytes
2190 bytes
There I was, minding my own business, when
zziffle wrote...
> Holy self-appointed vigilante newsgroup gatekeeper batman. This
> yetto fellow needs to lighten up a bit.
>
There have been several wanderers stopping by lately with verbose
explanations of how to fix code they have never seen. Is this why
colleges need to supply bandwidth in such generous amounts?
Mike "Sun Sep 4765, 1993 21:18:32 EDT" Yetto
--
"There is danger from all men. The only maxim of a free
government ought to be to trust no man living with power to
endanger the public liberty."
- John Adams
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads