[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Problem with embedded SDL window
From: |
Fred Schaettgen |
Subject: |
[Qemu-devel] Problem with embedded SDL window |
Date: |
Tue, 12 Oct 2004 16:25:41 +0200 |
User-agent: |
KMail/1.7 |
Hi all,
I'm currently working on a little external gui for qemu which embeds the SDL
window into its application window. It works quite well so far, but I've got
some problems with grabbing the mouse. The second time I try to grab the
mouse fails every time. Looking at the code of qemu I'm a bit puzzled what
this is supposed to do exactly:
<snip>
static void sdl_refresh(DisplayState *ds)
{
...
case SDL_ACTIVEEVENT:
if (gui_grab && (ev->active.gain & SDL_ACTIVEEVENTMASK) == 0 &&
!gui_fullscreen_initial_grab) {
sdl_grab_end();
}
<snap>
I've never used SDL, but the man page for SDL_ACTIVEEVENT states that
"gain" is either 0 or 1, while SDL_ACTIVEEVENTMASK is 2, so something seems to
be wrong with that line.
The attached patch changes SDL_ACTIVEEVENTMASK to SDL_ACTIVEEVENT, which seems
to fix my problem. This fixes my problem, but I'm not sure if the code really
does what it's supposed to do then.
Fred
--
Fred Schaettgen
address@hidden
sdl_embed_schaettgen.diff
Description: Text Data
- [Qemu-devel] Problem with embedded SDL window,
Fred Schaettgen <=