wind_get WF_WORKXYWH inconsistencies?

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

tschak909
Atari maniac
Atari maniac
Posts: 80
Joined: Mon Mar 26, 2018 9:29 pm

wind_get WF_WORKXYWH inconsistencies?

Postby tschak909 » Fri Aug 24, 2018 6:25 am

Hey guys, pushing through on PLATOTerm development, and am noticing something weird:

Periodically I do a wind_get(WF_WORKXYWH...) to get the dimensions of the inner content area of the current window.

Code: Select all

  wind_get(app.aeshdl,WF_WORKXYWH,&xw,&yw,&ww,&hw);
  window_x=xw;
  window_y=yw;
  ...


So fine, okay,

If I run a bog standard AES, e.g. TOS 2.06, 3.06... I get sane values here:

pt_tos_306.PNG


And the display renders predictably within the window.

However, under MiNT/XaAES/TeraDESK on ARANYM (a la Falcon VGA), I get the following values back:

pt_mint_snafu.PNG


And the terminal display renders 240 someodd pixels to the right, etc.. which spills outside the window frame...

Is there an implementation detail that I need to be aware of?

-Thom
You do not have the required permissions to view the files attached to this post.

joska
Hardware Guru
Hardware Guru
Posts: 4148
Joined: Tue Oct 30, 2007 2:55 pm
Location: Florø, Norway
Contact:

Re: wind_get WF_WORKXYWH inconsistencies?

Postby joska » Fri Aug 24, 2018 6:46 am

Is app.aeshdl the handle of your application or the window? I suspect the first, since it would work by accident (both application id and the handle of the first window will always be zero) in TOS but not in a multitasking system like MiNT or MagiC.
Last edited by joska on Fri Aug 24, 2018 8:44 am, edited 1 time in total.
Jo Even

VanillaMiNT - Firebee - Falcon060 - Milan060 - Falcon040 - MIST - Mega ST - STM - STE - Amiga 600 - Sharp MZ700 - MSX - Amstrad CPC - C64

tschak909
Atari maniac
Atari maniac
Posts: 80
Joined: Mon Mar 26, 2018 9:29 pm

Re: wind_get WF_WORKXYWH inconsistencies?

Postby tschak909 » Fri Aug 24, 2018 6:54 am

Oh wow. Ok. Will change that! Whoops.

User avatar
charles
10 GOTO 10
10 GOTO 10
Posts: 2394
Joined: Tue Aug 17, 2004 12:11 am
Location: ont. Canada
Contact:

Re: wind_get WF_WORKXYWH inconsistencies?

Postby charles » Fri Aug 24, 2018 10:49 am

if he keeps launching his code with out closing the window he'll soon run out of window handle?
and needs to use applexit for every occurance of appl init???
The radioactive half-life : )
Atari is a lifestyle,not a hobby.
HOLD ON ! ! ! Im printing unreadable characters ...!

ThorstenOtto
Captain Atari
Captain Atari
Posts: 400
Joined: Sun Aug 03, 2014 5:54 pm

Re: wind_get WF_WORKXYWH inconsistencies?

Postby ThorstenOtto » Fri Aug 24, 2018 11:44 am

??? He only posted a small part of his code, what makes you think the windows aren't closed? And what does that have to do with its problem?

User avatar
lp
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 2357
Joined: Wed Nov 12, 2003 11:09 pm
Location: GFA Headquarters
Contact:

Re: wind_get WF_WORKXYWH inconsistencies?

Postby lp » Fri Aug 24, 2018 1:46 pm

Different AES implementations have different size widgets. Make sure the initial full size of the window is calculated using wind_calc() based on the size of the work area you require. That's another possible cause. ;)

jury
Captain Atari
Captain Atari
Posts: 291
Joined: Tue Sep 21, 2004 11:11 am
Location: Poland

Re: wind_get WF_WORKXYWH inconsistencies?

Postby jury » Fri Aug 24, 2018 2:58 pm

ThorstenOtto wrote:??? He only posted a small part of his code, what makes you think the windows aren't closed?


Well, for charles 3 lines of code are enough to know whats going on in the whole application. Beat this!

( sorry, but I just couldn't take my hands off the keyboard, and I tried really hard! :] )

User avatar
wongck
Ultimate Atarian
Ultimate Atarian
Posts: 12463
Joined: Sat May 03, 2008 2:09 pm
Location: Far East
Contact:

Re: wind_get WF_WORKXYWH inconsistencies?

Postby wongck » Fri Aug 24, 2018 3:16 pm

jury wrote:
ThorstenOtto wrote:??? He only posted a small part of his code, what makes you think the windows aren't closed?


Well, for charles 3 lines of code are enough to know whats going on in the whole application. Beat this!

( sorry, but I just couldn't take my hands off the keyboard, and I tried really hard! :] )


it's those 3 micro dots.... Charles a member of the IMF
My Stuff: FB/Falcon CT63/CTPCI+ATI+RTL8139+USB 512MB 30GB HDD CF HxC_SD/ TT030 68882 4+32MB 520MB Nova/ 520STFM 4MB Tos206 SCSI
Shared SCSI Bus:ScsiLink ethernet, 9GB HDD,SD-reader @ http://phsw.atari.org
My Atari stuff for sale - click here for list

tschak909
Atari maniac
Atari maniac
Posts: 80
Joined: Mon Mar 26, 2018 9:29 pm

Re: wind_get WF_WORKXYWH inconsistencies?

Postby tschak909 » Fri Aug 24, 2018 3:19 pm

Thanks guys.

I'm writing 12 implementations of the same program, (they all have the same core code, just different system specific bits), and I've never written a program for GEM, so I am literally trying to solve problems as directly as I can. Expect many more gaffes as I fail quickly and try to get something that behaves well. :)

-Thom


Social Media

     

Return to “Coding”

Who is online

Users browsing this forum: No registered users and 1 guest