Bug#559618: boswars: Toggling Fullscreen with the space key in Video Options makes it change back immediately
Kalle Olavi Niemitalo
kon at iki.fi
Sat Dec 19 23:59:46 UTC 2009
Kalle Olavi Niemitalo <kon at iki.fi> writes:
I debugged this now (over ssh so I could set breakpoints without
causing keyboard events) and found that the keypress event gets
duplicated in gcn::SDLInput::processKeyRepeat, thus causing two
separate calls to the Lua code and ultimately to ToggleFullScreen.
I guess the video mode switch takes so long that Bos Wars thinks
they key should repeat ... even though it has actually been
released already. The easiest fix might be to make the checkbox
widget change its state not on key press events but rather on key
release events, which are not duplicated in this way.
It would be cleaner not to generate the repeated events in the
first place, but I don't know how difficult it would be to detect
at that point of time that the key has already been released. It
might be just a matter of asking SDL or it might not; the
checkbox widget change would be easier to get reliably right.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-games-devel/attachments/20091220/6d553a6b/attachment.pgp>
More information about the Pkg-games-devel
mailing list