| Summary: | Fullscreen on Twinview gives unexpected behaviour | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Trygve Vea <trygve.vea> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED DUPLICATE | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | superjoe30 |
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Attachments: | Don't touch the modelist from xvidmode if use_xinerama. | ||
|
Description
Trygve Vea
2007-10-29 12:07:14 UTC
I'm pretty sure it's related to the Xinerama code. SDL probably thinks your monitors are reversed and it's trying to center between them. You can debug into X11_EnterFullScreen(), and see what the Xinerama info is that it's using for positioning. I can't test this configuration myself, so please let me know what you find! (In reply to comment #1) > I'm pretty sure it's related to the Xinerama code. SDL probably thinks your > monitors are reversed and it's trying to center between them. > > You can debug into X11_EnterFullScreen(), and see what the Xinerama info is > that it's using for positioning. > > I can't test this configuration myself, so please let me know what you find! > I would, but; I don't want to sound to incompetent here --- but could you point me in the right direction? I have a hard time finding any documentation on X11_EnterFullScreen(). Thank you. I can confirm this bug; the exact same behavior happens on my debian TwinView setup. Are there any workarounds while this is resolved? (In reply to comment #2) > > I would, but; > > I don't want to sound to incompetent here --- but could you point me in the > right direction? I have a hard time finding any documentation on > X11_EnterFullScreen(). > > Thank you. > He wants you to look into the SDL code itself and figure out what SDL's fullscreen function uses to determine coordinates. OK, so I think I figured out how to solve this.
I've done some testing on my own, and it seems that if I change this:
#if SDL_VIDEO_DRIVER_X11_VIDMODE
/* XVidMode */
if ( !use_xrandr &&
#if SDL_VIDEO_DRIVER_X11_XINERAMA
(!use_xinerama || xinerama_info.screen_number == 0) &&
#endif
CheckVidMode(this, &vm_major, &vm_minor) &&
to
#if SDL_VIDEO_DRIVER_X11_VIDMODE
/* XVidMode */
if ( !use_xrandr &&
#if SDL_VIDEO_DRIVER_X11_XINERAMA
(!use_xinerama) &&
#endif
CheckVidMode(this, &vm_major, &vm_minor) &&
... the vidmode-code stops overwriting the modelist which was just built for xinerama - and stuff are placed where it's supposed to be. I can confirm that this works very well for my positioning problem.
(In reply to comment #4) > OK, so I think I figured out how to solve this. Here's patch diff -ruN SDL-1.2.orig/src/video/x11/SDL_x11modes.c SDL-1.2/src/video/x11/SDL_x11modes.c --- SDL-1.2.orig/src/video/x11/SDL_x11modes.c 2008-07-06 23:08:02.000000000 +0200 +++ SDL-1.2/src/video/x11/SDL_x11modes.c 2008-07-06 23:03:00.000000000 +0200 @@ -630,7 +630,7 @@ /* XVidMode */ if ( !use_xrandr && #if SDL_VIDEO_DRIVER_X11_XINERAMA - (!use_xinerama || xinerama_info.screen_number == 0) && + !use_xinerama && #endif CheckVidMode(this, &vm_major, &vm_minor) && SDL_NAME(XF86VidModeGetAllModeLines)(SDL_Display, SDL_Screen,&nmodes,&modes) ) Created attachment 258 [details]
Don't touch the modelist from xvidmode if use_xinerama.
I am not aware if there is any scenarios where you would like the xvidmode to overwrite the modelist just generated for xinerama. If that is the case - my patch will probably break it.
I apoligize for my two latest posts ... I am not that familiar with using these tools - but I'm learning :)
Regards, Trygve
(In reply to comment #6) > Created an attachment (id=258) [details] > Don't touch the modelist from xvidmode if use_xinerama. > > I am not aware if there is any scenarios where you would like the xvidmode to > overwrite the modelist just generated for xinerama. If that is the case - my > patch will probably break it. > > I apoligize for my two latest posts ... I am not that familiar with using these > tools - but I'm learning :) > > Regards, Trygve > Thanks for the updates! These are helpful. (In reply to comment #7) > (In reply to comment #6) > > Created an attachment (id=258) [details] [details] > > Don't touch the modelist from xvidmode if use_xinerama. > > > > I am not aware if there is any scenarios where you would like the xvidmode to > > overwrite the modelist just generated for xinerama. If that is the case - my > > patch will probably break it. > > > > I apoligize for my two latest posts ... I am not that familiar with using these > > tools - but I'm learning :) > > > > Regards, Trygve > > > > Thanks for the updates! These are helpful. > Looking through more bugs, and found something interesting. It seems that this is a duplicate, and someone have solved it somewhat better than I did. Check out http://bugzilla.libsdl.org/show_bug.cgi?id=562 |