Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
140 user(s) are online (131 user(s) are browsing Forums)

Members: 0
Guests: 140

more...

Support us!

Headlines

 
  Register To Post  

Frontmost pubscreen?
Quite a regular
Quite a regular


See User information
How do I find out what pubscreen is the frontmost?

I have a window I like to open on the frontmost pubscreen but the pubscreen list has WB as its first entry which probably means it isn't sorted depth-wise.

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top
Re: Frontmost pubscreen?
Just can't stay away
Just can't stay away


See User information
Using IIntuition->LockScreenList() the first screen is the front most one. Use other means to check if it's a public one or not.

I don't know if it's guaranteed to be like that in future. Maybe it would be nice if there will be a new function in Intuition to get the front most screen always.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: Frontmost pubscreen?
Just popping in
Just popping in


See User information
IntuitionBase->FirstScreen (better lock IBase while you read it).

Go to top
Re: Frontmost pubscreen?
Quite a regular
Quite a regular


See User information
@TSK

Problem is I need it to work on Classic, hence the post in the Classic forum. LockScreenList() is V50, otherwise I would have used it

@centaurz

mmm, so hacking away it is then

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top
Re: Frontmost pubscreen?
Quite a regular
Quite a regular


See User information
Finally made it work. One version for OS4 with LockScreenList() & GetScreenAttr() and one for the others with LockPubScreenList() and some hacking.

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top
Re: Frontmost pubscreen?
Just popping in
Just popping in


See User information
@Deniil

You mean a straightforward and elegant way of accessing information . No need for weird accessor such as IIntuition->GiveMeFrontmostScreenPlease().

Go to top
Re: Frontmost pubscreen?
Just can't stay away
Just can't stay away


See User information
@deniil
Quote:
Problem is I need it to work on Classic, hence the post in the Classic forum. LockScreenList() is V50, otherwise I would have used it

Oops my mistake. I didn't check which forum this is.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: Frontmost pubscreen?
Just can't stay away
Just can't stay away


See User information
There's a tool "FrontPubScreen" on Aminet with source code. Compiled it on OS4 a while back and it works really well.

If I remember right, even if you're running the program from an active shell window while actually on another screen (i.e so you cannot see the shell window you're typing in), when you switch screens to check what the shell output is, it will have printed the name of the screen you were actually looking at, and not the screen the shell window is on.


Edited by MickJT on 2011/8/10 5:32:12
Go to top
Re: Frontmost pubscreen?
Quite a regular
Quite a regular


See User information
@MickJT

Cool! I tested my solution this way and it worked the same way :)

@centaurz

Hmm, well One may want to be able to move the OS into the future as well. Perhaps going 64-bit? Doing it this way ensures that will be as difficult as possible....

Software developer for Amiga OS3 and OS4.
Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project