Re: [AD] MSVC mouse problem (may be a bug?) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> I found the glitch: when you are at "fullscreen" mode,
> there are still some applications than can "invade"
> your screen, for example, Yahoo Messenger "new e-mail"
> announce.
Does the same happen with other fullscreen DirectX apps?
> I made a "quick-and-dirty" patch to my application,
> adding a "SetCursorPos(0,0)" in the main loop, not
> very efficient, but works by now. I don't know how
> does this (parent?) applications manage to invade "my"
> fullscreen, but I guess allegro should put windows in
> that mode (modal fullscreen??) to avoid this kind of
> "intruders"...
Does the attached patch make any difference?
--
Eric Botcazou
--- /home/eric/cvs/allegro/src/win/wddmode.c Fri Nov 15 11:39:39 2002
+++ allegro/src/win/wddmode.c Fri Oct 31 16:11:18 2003
@@ -399,8 +399,11 @@
/* remove the window controls */
SetWindowLong(allegro_wnd, GWL_STYLE, WS_POPUP);
- /* maximize the window */
- ShowWindow(allegro_wnd, SW_MAXIMIZE);
+ /* maximize the window and make it always-on-top */
+ SetWindowPos(allegro_wnd, HWND_TOPMOST, 0, 0,
+ GetSystemMetrics(SM_CXSCREEN),
+ GetSystemMetrics(SM_CYSCREEN),
+ SWP_NOCOPYBITS);
/* put it in the foreground */
SetForegroundWindow(allegro_wnd);