Losing focus because of a warning window - windows CE

Hello!

We’re developing an application in SDL for windows CE. When there’s a
power failure on the mobile device, a warning window pops up and the
application loses focus until you touch the screen.
The WM messages we receive are (in that order) WM_NCACTIVATE (we’re not
sure what it means) and WM_CAPTURECHANGED (We force a redraw here and
regain focus, but the pop-up window remains upfront. If we don’t redraw,
we cannot gain focus.).

How can we prevent this pop-up window from drawing itself on top of our
application?

Thanks–
Marko Djukic

The big game I’ve been working on treates loss of focus as a signal to pause, preventing the catastrophic to game consequences of running on without player control. Also yields CPU that may be wanted by the current forground process. Don’t think I’d want to prempt something as critical as a loss of power notice.

Hi,

I’ve developed a WinCE part of SDL and AFAIK this case has been tested OK.
What is your device?
What driver do you use - GAPI or WinDib?
What version of SDL?

Could you send me a test case (short piece of code that reproduce a
behaviour).

p.s. if it is a bug I think a fix will be trivial

We’re developing an application in SDL for windows CE. When there’s a
power failure on the mobile device, a warning window pops up and the
application loses focus until you touch the screen.
The WM messages we receive are (in that order) WM_NCACTIVATE (we’re not
sure what it means) and WM_CAPTURECHANGED (We force a redraw here and
regain focus, but the pop-up window remains upfront. If we don’t redraw,
we cannot gain focus.).
Best Regards,
Dmitry Yakimov

I’ll explain better what happens. When you take the battery out of the
mobile device (to replace it with a fully charged one) it goes into
suspend mode. You can also use the device on a cradle without the
battery and it will also go into suspend if you take it off the cradle
(basically you cut the power).
When you replace the battery and wake the device up, the application
continues normally. But then a window pops up to warn you about a high
current demand which caused the device to suspend (removal of battery or
removal of device with no battery from the cradle). It pops up in front
of the application we’re running.
Redrawing the window with the application helps to regain focus, but the
warning window is still in front of our application (which runs full
screen) and you have to ‘click’ (touch) on our application (behind the
window) to bring it in front. We want to force our application to be
always in front, or at least hide the warning windows as fast as
possible and bring the application in front.

I hope I cleared out the problem.

We’re using windows CE 4.1, SDL 1.2 and GAPI.

Thanks

Marko Djukic

Dmitry Yakimov wrote:> Hi,

I’ve developed a WinCE part of SDL and AFAIK this case has been tested OK.
What is your device?
What driver do you use - GAPI or WinDib?
What version of SDL?

Could you send me a test case (short piece of code that reproduce a
behaviour).

p.s. if it is a bug I think a fix will be trivial

We’re developing an application in SDL for windows CE. When there’s a
power failure on the mobile device, a warning window pops up and the
application loses focus until you touch the screen.
The WM messages we receive are (in that order) WM_NCACTIVATE (we’re not
sure what it means) and WM_CAPTURECHANGED (We force a redraw here and
regain focus, but the pop-up window remains upfront. If we don’t redraw,
we cannot gain focus.).

Best Regards,
Dmitry Yakimov


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

When worked with Windows CE, I’ve got the same problem (but not
using SDL), when the application is in full screen (or pseudo-full
screen) and some warning windows pops. It’s not an SDL error, but an
windows CE API error, I think.
I don’t have access to the code we’ve done anymore (it was on a
property software and I left working on that company), but I remeber
that we make an event grabber to take the suspend event and prevent
showing the popup, forcelly making the window to be on Top and with
focus, but the idea from cal is the better, pause the application when
get the event.
In the worst case cenario, don’t run the aplication on full screen,
Windows CE have a lot of bugs on that (argh, I lost a lot of work
hours with them).

[]s,
Farrer

2006/7/12, Marko Djukic :>

I’ll explain better what happens. When you take the battery out of the
mobile device (to replace it with a fully charged one) it goes into suspend
mode. You can also use the device on a cradle without the battery and it
will also go into suspend if you take it off the cradle (basically you cut
the power).
When you replace the battery and wake the device up, the application
continues normally. But then a window pops up to warn you about a high
current demand which caused the device to suspend (removal of battery or
removal of device with no battery from the cradle). It pops up in front of
the application we’re running.
Redrawing the window with the application helps to regain focus, but the
warning window is still in front of our application (which runs full screen)
and you have to ‘click’ (touch) on our application (behind the window) to
bring it in front. We want to force our application to be always in front,
or at least hide the warning windows as fast as possible and bring the
application in front.

I hope I cleared out the problem.

We’re using windows CE 4.1, SDL 1.2 and GAPI.

Thanks

Marko Djukic

Dmitry Yakimov wrote:
Hi,

I’ve developed a WinCE part of SDL and AFAIK this case has been tested OK.
What is your device?
What driver do you use - GAPI or WinDib?
What version of SDL?

Could you send me a test case (short piece of code that reproduce a
behaviour).

p.s. if it is a bug I think a fix will be trivial

We’re developing an application in SDL for windows CE. When there’s a
power failure on the mobile device, a warning window pops up and the
application loses focus until you touch the screen.
The WM messages we receive are (in that order) WM_NCACTIVATE (we’re not
sure what it means) and WM_CAPTURECHANGED (We force a redraw here and
regain focus, but the pop-up window remains upfront. If we don’t redraw,
we cannot gain focus.).

Best Regards,
Dmitry Yakimov


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl