Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Maemo: Developers

How to catch “lock screen event”?

 

 

Maemo developers RSS feed   Index | Next | Previous | View Threaded


Xin.Zhang at ifeservices

Jul 27, 2010, 7:45 PM

Post #1 of 3 (303 views)
Permalink
How to catch “lock screen event”?

Hi all,

I'm developing a game for n900 using SDL. How do I catch system events (like lock screen switch turned on/off, screen gets locked automatically, or incoming call during game play)?

Right now when the game is running, I could not catch the system events (like lock screen switch turned on/off, screen gets locked automatically, or incoming call during game play). Therefore, the game is still active running even screen is locked. I hope I can catch these system events and make the game paused. Could anyone give me some direction in fixing the problem?

I've posted a thread in [http://talk.maemo.org/showthread.php?t=59238]. Many thanks!

Best regards,
Zhang Xin

Sent on behalf of IFE Services Ltd

This email (including any attachments) is for its intended-recipient's use only.
This email may contain information that is confidential or privileged.
If you received this email in error, please immediately advise the sender by replying to this email and then delete this message from your system.

_______________________________________________________________________
This email has been scanned for all viruses by Netscalibur Mail Scanner, powered by MessageLabs.
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


eero.tamminen at nokia

Jul 30, 2010, 1:43 AM

Post #2 of 3 (276 views)
Permalink
Re: How to catch “lock screen event”? [In reply to]

Hi,

ext Xin Zhang wrote:
> I'm developing a game for n900 using SDL. How do I catch system events (like lock screen switch turned on/off, screen gets locked automatically, or incoming call during game play)?
>
> Right now when the game is running, I could not catch the system events (like lock screen switch turned on/off, screen gets locked automatically, or incoming call during game play). Therefore, the game is still active running even screen is locked. I hope I can catch these system events and make the game paused. Could anyone give me some direction in fixing the problem?
>
> I've posted a thread in [http://talk.maemo.org/showthread.php?t=59238]. Many thanks!

Your window loses focus and it isn't anymore the topmost window.
When the screen is blanked, there's additionally also a D-BUS message.


- Eero
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers


Xin.Zhang at ifeservices

Aug 2, 2010, 12:47 AM

Post #3 of 3 (265 views)
Permalink
RE: How to catch “lock screen event”? [In reply to]

Hi Eero,

You said “Your window loses focus and it isn't anymore the topmost window.”

Do you mean the use of “SDL_ACTIVEEVENT”? I can get an “SDL_ACTIVEEVENT” event if I get an incoming call while playing the game. However, I don't get the “SDL_ACTIVEEVENT” event if I lock the screen using the lock screen switch, or even the screen gets locked automatically, after idling for 30 secs. Is there a firmware update addressing this? I wonder if there's a way doing this without dbus...

Thanks & best regards,
Zhang Xin

________________________________________
From: maemo-developers-bounces [at] maemo [maemo-developers-bounces [at] maemo] On Behalf Of Eero Tamminen [eero.tamminen [at] nokia]
Sent: Friday, July 30, 2010 4:43 PM
To: maemo-developers [at] maemo
Subject: Re: How to catch “lock screen event”?

Hi,

ext Xin Zhang wrote:
> I'm developing a game for n900 using SDL. How do I catch system events (like lock screen switch turned on/off, screen gets locked automatically, or incoming call during game play)?
>
> Right now when the game is running, I could not catch the system events (like lock screen switch turned on/off, screen gets locked automatically, or incoming call during game play). Therefore, the game is still active running even screen is locked. I hope I can catch these system events and make the game paused. Could anyone give me some direction in fixing the problem?
>
> I've posted a thread in [http://talk.maemo.org/showthread.php?t=59238]. Many thanks!

Your window loses focus and it isn't anymore the topmost window.
When the screen is blanked, there's additionally also a D-BUS message.


- Eero
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Sent on behalf of IFE Services Ltd

This email (including any attachments) is for its intended-recipient's use only.
This email may contain information that is confidential or privileged.
If you received this email in error, please immediately advise the sender by replying to this email and then delete this message from your system.

_______________________________________________________________________
This email has been scanned for all viruses by Netscalibur Mail Scanner, powered by MessageLabs.
_______________________________________________
maemo-developers mailing list
maemo-developers [at] maemo
https://lists.maemo.org/mailman/listinfo/maemo-developers

Maemo developers RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.