English Amiga Board


Go Back   English Amiga Board > Coders > Coders. General

 
 
Thread Tools
Old 13 August 2011, 01:43   #1
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,411
Detect screen switching....IDCMP_ACTIVEWINDOW and IDCMP_INACTIVEWINDOW

Is it possible to detect when your screen is not longer the visible screen (eg the user has switched to a new screen).

I tried catching 'IDCMP_ACTIVEWINDOW and IDCMP_INACTIVEWINDOW' but they are only sent if the user actually clicks with the mouse on a different screen.

NovaCoder is offline  
Old 13 August 2011, 07:16   #2
Minuous
Coder/webmaster/gamer
 
Minuous's Avatar
 
Join Date: Oct 2001
Location: Canberra/Australia
Posts: 2,673
You could probably look at some fields of GfxBase or similar to get the frontmost screen. Bear in mind of course that a screen can be visible and yet not frontmost though.
Maybe screennotify.library has some useful functionality for this, I haven't investigated that possibility.
Minuous is offline  
Old 13 August 2011, 23:27   #3
DrCinicus
Registered User
 
Join Date: Oct 2008
Location: Assemini/Italy
Age: 51
Posts: 23
Quote:
Originally Posted by NovaCoder View Post
Is it possible to detect when your screen is not longer the visible screen (eg the user has switched to a new screen).

I tried catching 'IDCMP_ACTIVEWINDOW and IDCMP_INACTIVEWINDOW' but they are only sent if the user actually clicks with the mouse on a different screen.

You can check the ib_FirstScreen in IntuitionBase, comparing the value with your screen pointer. You have to check regularly so you can use an INTUI_TICK event or a vbl interrupt (I saw this on a demo startup code).

Bye
DrCinicus is offline  
Old 14 August 2011, 05:06   #4
NovaCoder
Registered User
 
NovaCoder's Avatar
 
Join Date: Sep 2007
Location: Melbourne/Australia
Posts: 4,411
yep it looks like there's no easy way to do it via an event, oh well never mind
NovaCoder is offline  
Old 14 August 2011, 18:17   #5
Shadowfire
Registered User
 
Shadowfire's Avatar
 
Join Date: Aug 2001
Location: Connecticut USA
Posts: 617
That kind of user activity is meant to be transparent to the application.
Shadowfire is offline  
 


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to detect WinUAE demolition support.Apps 13 13 November 2012 11:21
On the fly full screen <-> full window switching NewDeli request.UAE Wishlist 19 22 May 2010 17:40
issue related to screen mode switching under workbench pbareges support.Apps 1 14 March 2007 15:08
'detect pixel format' Melroc support.WinUAE 2 09 December 2003 16:03

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 23:54.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.07450 seconds with 13 queries