🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #190689

Re: Xnews Metrics Bug

#190689
From: zziffle
Date: Sat, 16 Sep 2006 04:18
38 lines
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...
Technical Details
Message-ID: <Xns983FD8DB9BB3Eazzifflepost@24.64.223.211>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!pd7cy3no!pd7cy4no!shaw.ca!pd7tw1no.POSTED!53ab2750!not-for-mail
References: <Xns983FA4B2D1544azzifflepost@24.64.223.211> <Xns983FEC2817E21uniquelyme@tomate.motzarella.org>

Show Full Headers
Complete Article Headers
Message-ID: <Xns983FD8DB9BB3Eazzifflepost@24.64.223.211>
Subject: Re: Xnews Metrics Bug
Date: Sat, 16 Sep 2006 04:18:51 GMT
From: zziffle <nomail@thank.you>
References: <Xns983FA4B2D1544azzifflepost@24.64.223.211> <Xns983FEC2817E21uniquelyme@tomate.motzarella.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!pd7cy3no!pd7cy4no!shaw.ca!pd7tw1no.POSTED!53ab2750!not-for-mail
X-Trace-PostClient-IP: 24.108.201.248
Newsgroups: news.software.readers
User-Agent: Xnews/2006.08.24
Lines: 38
NNTP-Posting-Host: 24.64.223.206
X-Complaints-To: abuse@shaw.ca
X-Trace: pd7tw1no 1158380331 24.64.223.206 (Fri, 15 Sep 2006 22:18:51 MDT)
NNTP-Posting-Date: Fri, 15 Sep 2006 22:18:51 MDT
Organization: Shaw Residential Internet