Hi all,
I’m trying to run a SDL application in an embedded enviroment,
where the X-server has no window manager. My app uses OpenGL and
it’s running in fullscreen and the video is opened with this flags:
// Calculate video flags.
m_videoflags = SDL_OPENGL|SDL_DOUBLEBUF|SDL_FULLSCREEN|SDL_HWSURFACE;
The mouse and video are working properly but I have a problem: I don’t
get the keyboard events in my app, it’s like the keyboard focus is on
other window (there are some internal X11 windows created by SDL). The
same app in my workstation with the KDE and so on, is working ok, then
I think is some thing related to the window management.
I’ve tried the next code with no luck. Anybody knows how to get
keyboard events ?
Thanks,
Jorge
//-----------------------------------------------------------------------------
//! Helper function to activate the window.
//
static void ScreenActivate()
{
SDL_SysWMinfo wm;
// Get window info.
SDL_VERSION( &wm.version );
SDL_GetWMInfo( &wm );
// Lock to display access.
wm.info.x11.lock_func();
// Show the window on top.
XMapRaised( wm.info.x11.display, wm.info.x11.wmwindow );
// Set the focus on it.
XSetInputFocus( wm.info.x11.display, wm.info.x11.wmwindow,
RevertToParent, CurrentTime );
wm.info.x11.unlock_func();
}
Aviso de Confidencialidad de E-mail La informaci?n incluida en el presente
correo electr?nico es CONFIDENCIAL, siendo de uso exclusivo para el
destinatario arriba mencionado. Si Ud. lee este mensaje y no es el
destinatario al que va dirigido o el agente, empleado responsable de
entrega del mensaje al destinatario; le informamos que est? prohibida
cualquier divulgaci?n, distribuci?n o reproducci?n de cualquier modo y le
rogamos que se nos notifique y devuelva el mensaje a la direcci?n de
origen, procediendo a continuaci?n a su
eliminaci?n.--------------------------------------------------------------------------------------------------------------------------------------------------------Confidentiality
E-mail Warning The information included in this electronic mail is
CONFIDENTIAL, being for of exclusive use for the recipient mentioned. If
you read this message and he/she is not the recipient to whon is directed
neither the agent, employee responsible for delivery of the message to the
addressee; we inform you that it is forbidden any distribution or
reproduction by any means and we request you to notified and return the
message to the sender, proceeding after that to delet it.