unexpected UnmapNotify event |
Terry Welsh
Guest
|
I'm hunting a weird bug at the moment. When I compile an SDL app on
32-bit Linux and run it on 64-bit Linux, I receive an UnmapNotify event when I go fullscreen. This causes the window to disappear (no window icon remains either). The app is still running but the window is gone. Behavior can vary a little depending on the desktop environment. Has anyone seen anything remotely like this? I'm going to dig back into it after lunch. -- Terry Welsh www.reallyslick.com _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||
|
unexpected UnmapNotify event |
Terry Welsh
Guest
|
Thanks for the reply, John. After more digging, I found this problem
has been dealt with to a large extent. SDL is trying to decide whether or not to use legacy fullscreen support and incorrectly deciding to use it. Fullscreen is such a mess in Linux, making the right decision might be impossible so I can't blame SDL. Using export SDL_VIDEO_X11_LEGACY_FULLSCREEN=0 solves the problem. Whatever final solution I pick, this env variable will definitely be in the troubleshooting notes on my website. -- Terry Welsh www.reallyslick.com On Mon, Jul 29, 2013 at 12:28 PM, John wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
unexpected UnmapNotify event |
gabomdq
|
So it's failing to use XRandr while it's actually available?
2013/7/29 Terry Welsh
-- Gabriel. |
|||||||||||||||||
|
unexpected UnmapNotify event |
Terry Welsh
Guest
|
Hi Gabriel,
Perhaps. XRandr is on the computer I'm using, but I'm afraid I don't know where the failure is really happening. I suspect it's somewhere deep inside X because I don't know where else an unmap event could be generated. The most specific I can be is to point you to line 1162 in SDL_x11window.c. This is where legacy is set to true because displaydata->use_vidmode is true. If legacy does not get set to true here, my app succesfully goes fullscreen. -- Terry Welsh www.reallyslick.com
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
unexpected UnmapNotify event |
gabomdq
|
The decision on whether use_vidmode is true or false is done in X11_InitModes in SDL_x11modes.c
You can define X11MODES_DEBUG at the top, and maybe trace a bit inside that function (regular printf statements work just fine for this), and try to see why if you have XRandr in your system, it's not getting picked up (lines 412-418) 2013/7/30 Terry Welsh
-- Gabriel. |
|||||||||||||||
|
unexpected UnmapNotify event |
Terry Welsh
Guest
|
a week. I'll try to look at it again then. This is probably a rare problem, but it would be nice to find a concrete solution to put into SDL. - Terry _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|
unexpected UnmapNotify event |
Terry Welsh
Guest
|
I got a bit further on this problem. Too bad the title of this thread
is probably completely off-topic now. If I compile SDL and my game on 32-bit Fedora and run on the same computer everything is fine. If I run the same builds of my game and SDL on 64-bit Ubuntu, things break. I've come to the following two code blocks in SDL_x11modes.c: if (!SDL_X11_HAVE_XINERAMA) { #ifdef X11MODES_DEBUG printf("Xinerama support not available\n"); #endif return SDL_FALSE; } if (!SDL_X11_HAVE_XRANDR) { #ifdef X11MODES_DEBUG printf("XRandR support not available\n"); #endif return SDL_FALSE; } SDL_X11_HAVE_XINERAMA and SDL_X11_HAVE_XRANDR evaluate to true on my 32-bit computer and these blocks get skipped. They evaluate to false on my 64-bit computer and both functions return false. Can someone tell me where these are defined? They don't exist anywhere else in the code. I'm not sure why they evaluate to false because I have xrandr and xinerama on the 64-bit computer. But it's a good thing that they do because if I bypass these blocks SDL will crash on XineramaQueryExtension() or XRRQueryVersion(). Anyway, this brings me back to this bit in SDL_x11window.c: if ( displaydata->use_vidmode ) { legacy = SDL_TRUE; /* the new stuff only works with XRandR. */ } Counter to what the comment says, the new stuff works for me even though SDL reports XRandR as unavailable. Setting legacy = true here causes ugly fullscreen problems on 64-bit Ubuntu with both KDE and Xfce. Although, the symptoms are different on each DE. Compiling my game and SDL on the 64-bit computer, xinerama and xrandr are found, so use_xvidmode remains 0, legacy remains false, and fullscreen works properly. I'd really like to get the same result from a 32-bit build. -- Terry Welsh www.reallyslick.com On Tue, Jul 30, 2013 at 8:48 PM, Terry Welsh wrote:
SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||||
|
unexpected UnmapNotify event |
unexpected UnmapNotify event |
Terry Welsh
Guest
|
I guess I falsely assumed that since the SDL 1.2 build of my game worked, I already had all the right libraries. I think I'll also try to add a warning when the game starts up if these libraries don't get loaded. - Terry _______________________________________________ SDL mailing list http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org |
|||||||||||||
|