Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » ALT + key in windowed mode

This thread is locked; no one can reply to it. rss feed Print
ALT + key in windowed mode
spellcaster
Member #1,493
September 2001
avatar

I have a problem on windowsXP with allegro 4.1.8 running windowed.

Pressing ALT together with any other key reults in the "keybuffer full" beep. It also seems to have other effects as well, since switching from fullscreen into windowed mode while holding the ALT+any-other-key pressed results in very strange behavior.

EDIT:
The strange behavoir seems to be that the allegro window is set to desktop size after it was shorty visible in normal windowed mode.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

Evert
Member #794
November 2000
avatar

Can you check if this is a problem that has been introduced recently, ie, if it happens too with a slightly older version of Allegro?

spellcaster
Member #1,493
September 2001
avatar

I'll check that after TINS.
Small update: if you wait long enough, this doesn't happen. Seems like a windows message is causing problems.
If I do a

set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
rest(1000);

before I set the new mode, it seems to work. The windows switch at least. The problem with the buffer-full sound in windowed mode seems to be a different thing. I guess it's because ALT is a magic key or something.

--
There are no stupid questions, but there are a lot of inquisitive idiots.

A J
Member #3,025
December 2002
avatar

confirmed.
i get the system beep in winXP, alg 4.1.18 when i press alt-[0-9,a-z]
however alt+[F1-F12] do not cause the beep.
and it only occurs in Windowed mode.

___________________________
The more you talk, the more AJ is right. - ML

X-G
Member #856
December 2000
avatar

I do not see that behaviour, using 4.1.17 on Windows XP.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

A J
Member #3,025
December 2002
avatar

spy++ shows: WM_MENUCHAR (fAction=0) discard character and beep.

along with about 10 other menu related messages.

it looks like, if the menu does not handle the ALT key, the system issues a beep.

i tried /allegro4.1.16/tests/test.exe in windowed mode and it happens.
also /allegro/4.1.13/tests/test.exe in windowed mode it happens, fullscreen it does not occur.

i was unable to test 4.1.17

i hacked /allegro4.1.18/src/win/wnd.c create_directx_window()
line 412: CreateWindowEx( ... )
i removed the WS_SYSMENU
and the beep no longer occurs.

does anyone know why WS_SYSMENU was ever included ?

(edit) i posted a solution on [AD] mail list.

___________________________
The more you talk, the more AJ is right. - ML

Gideon Weems
Member #3,925
October 2003

Damn. AJ gets things done. ;D

A J
Member #3,025
December 2002
avatar

its a team effort.
please credit all contributors.

___________________________
The more you talk, the more AJ is right. - ML

Gideon Weems
Member #3,925
October 2003

Ack! And he's a good communist too! ;D

-- edit --

I didn't mean to say that you were the only person getting things done. Thanks to all.

Go to: