| Summary: | Fullscreen window created with SDL_SetVideoMode() in X11 has no keyboard events | ||
|---|---|---|---|
| Product: | SDL | Reporter: | slyffx |
| Component: | events | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | CC: | eddie |
| Version: | HG 2.0 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
slyffx
2010-04-16 03:46:48 UTC
(In reply to comment #0) > If a fullscreen window is created with SDL_Init() using SDL_FULLSCREEN. The > window will not have keyboard input events. Program works as expected in sdl > 1.2 (The program is not at fault). Correction, SDL_SetVideoMode() was used to create the window. I started my application using the new SDL 1.3 method (SDL_VideoInit, SDL_CreateWindow, etc.) and I still am unable to accept input when in fullscreen. Windowed mode works fine. One note, when I start in fullscreen, try to send keyboard input, and then Ctrl+C to close the app, the terminal is filled with character sequences like "^[[A^[[B" (hopefully you know what I'm talking about, I forget what they are called.) However, when in windowed mode, I press the arrow keys and my object moves as expected, with no characters outputted to the terminal. Is my application getting focus when it is started or is it left at the terminal? Yup, confirmation that the window isn't getting focus. I tried adding a call to SDL_RaiseWindow() but that doesn't seem to help. I was able to get input working in fullscreen by Alt-Tabbing away from the terminal, but then I had to drop to text-only mode to kill the app (my fault for not adding a quit key, heh). (In reply to comment #3) > Yup, confirmation that the window isn't getting focus. I tried adding a call to > SDL_RaiseWindow() but that doesn't seem to help. I was able to get input > working in fullscreen by Alt-Tabbing away from the terminal, but then I had to > drop to text-only mode to kill the app (my fault for not adding a quit key, > heh). Correction, just Alt-Tabbing in general (and then the window appears and input works after I stop Alt-Tabbing). This should be fixed with the latest snapshot. It correctly uses the _NET_WM_STATE_FULLSCREEN protocol and lets the window manager handle the input focus. |