comparison src/video/x11/SDL_x11video.h @ 1765:c2c6ff414ef5

Fixed bug #45 Improved Xinerama support. Added support for the SDL_VIDEO_FULLSCREEN_HEAD environment variable, currently supported on X11 Xinerama configurations. Only use the VidMode extension on the primary head.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 04 May 2006 16:51:07 +0000
parents 34cca785be57
children c546353b1ad4
comparison
equal deleted inserted replaced
1764:4b2f27334dce 1765:c2c6ff414ef5
32 #include "../SDL_sysvideo.h" 32 #include "../SDL_sysvideo.h"
33 33
34 #if SDL_VIDEO_DRIVER_X11_DGAMOUSE 34 #if SDL_VIDEO_DRIVER_X11_DGAMOUSE
35 #include "../Xext/extensions/xf86dga.h" 35 #include "../Xext/extensions/xf86dga.h"
36 #endif 36 #endif
37 #if SDL_VIDEO_DRIVER_X11_XINERAMA
38 #include "../Xext/extensions/Xinerama.h"
39 #endif
40 #if SDL_VIDEO_DRIVER_X11_XRANDR
41 #include <X11/extensions/Xrandr.h>
42 #endif
37 #if SDL_VIDEO_DRIVER_X11_VIDMODE 43 #if SDL_VIDEO_DRIVER_X11_VIDMODE
38 #include "../Xext/extensions/xf86vmode.h" 44 #include "../Xext/extensions/xf86vmode.h"
39 #endif 45 #endif
40 #if SDL_VIDEO_DRIVER_X11_XME 46 #if SDL_VIDEO_DRIVER_X11_XME
41 #include "../Xext/extensions/xme.h" 47 #include "../Xext/extensions/xme.h"
42 #endif
43 #if SDL_VIDEO_DRIVER_X11_XRANDR
44 #include <X11/extensions/Xrandr.h>
45 #endif 48 #endif
46 49
47 #include "SDL_x11dyn.h" 50 #include "SDL_x11dyn.h"
48 51
49 /* Hidden "this" pointer for the video functions */ 52 /* Hidden "this" pointer for the video functions */
107 110
108 Visual *vis; /* current visual in use */ 111 Visual *vis; /* current visual in use */
109 int depth; /* current visual depth (not bpp) */ 112 int depth; /* current visual depth (not bpp) */
110 113
111 /* Variables used by the X11 video mode code */ 114 /* Variables used by the X11 video mode code */
112 #if SDL_VIDEO_DRIVER_X11_VIDMODE 115 #if SDL_VIDEO_DRIVER_X11_XINERAMA
113 SDL_NAME(XF86VidModeModeInfo) saved_mode; 116 SDL_NAME(XineramaScreenInfo) xinerama_info;
114 struct {
115 int x, y;
116 } saved_view;
117 #endif
118 #if SDL_VIDEO_DRIVER_X11_XME /* XiG XME fullscreen */
119 int use_xme;
120 XiGMiscResolutionInfo saved_res;
121 #endif 117 #endif
122 #if SDL_VIDEO_DRIVER_X11_XRANDR 118 #if SDL_VIDEO_DRIVER_X11_XRANDR
123 XRRScreenConfiguration* screen_config; 119 XRRScreenConfiguration* screen_config;
124 int saved_size_id; 120 int saved_size_id;
125 Rotation saved_rotation; 121 Rotation saved_rotation;
126 #endif 122 #endif
127 123 #if SDL_VIDEO_DRIVER_X11_VIDMODE
128 int xinerama_x; 124 SDL_NAME(XF86VidModeModeInfo) saved_mode;
129 int xinerama_y; 125 struct {
126 int x, y;
127 } saved_view;
128 #endif
129 #if SDL_VIDEO_DRIVER_X11_XME /* XiG XME fullscreen */
130 XiGMiscResolutionInfo saved_res;
131 #endif
132
133 int use_xinerama;
134 int use_xrandr;
130 int use_vidmode; 135 int use_vidmode;
131 int use_xrandr; 136 int use_xme;
132 int currently_fullscreen; 137 int currently_fullscreen;
133 138
134 /* Automatic mode switching support (entering/leaving fullscreen) */ 139 /* Automatic mode switching support (entering/leaving fullscreen) */
135 Uint32 switch_waiting; 140 Uint32 switch_waiting;
136 Uint32 switch_time; 141 Uint32 switch_time;
172 #define window_h (this->hidden->window_h) 177 #define window_h (this->hidden->window_h)
173 #define mouse_last (this->hidden->mouse_last) 178 #define mouse_last (this->hidden->mouse_last)
174 #define mouse_accel (this->hidden->mouse_accel) 179 #define mouse_accel (this->hidden->mouse_accel)
175 #define mouse_relative (this->hidden->mouse_relative) 180 #define mouse_relative (this->hidden->mouse_relative)
176 #define SDL_modelist (this->hidden->modelist) 181 #define SDL_modelist (this->hidden->modelist)
182 #define xinerama_info (this->hidden->xinerama_info)
177 #define saved_mode (this->hidden->saved_mode) 183 #define saved_mode (this->hidden->saved_mode)
178 #define saved_view (this->hidden->saved_view) 184 #define saved_view (this->hidden->saved_view)
179 #define use_xme (this->hidden->use_xme)
180 #define saved_res (this->hidden->saved_res) 185 #define saved_res (this->hidden->saved_res)
181 #define use_xrandr (this->hidden->use_xrandr)
182 #define screen_config (this->hidden->screen_config) 186 #define screen_config (this->hidden->screen_config)
183 #define saved_size_id (this->hidden->saved_size_id) 187 #define saved_size_id (this->hidden->saved_size_id)
184 #define saved_rotation (this->hidden->saved_rotation) 188 #define saved_rotation (this->hidden->saved_rotation)
185 #define xinerama_x (this->hidden->xinerama_x) 189 #define use_xinerama (this->hidden->use_xinerama)
186 #define xinerama_y (this->hidden->xinerama_y)
187 #define use_vidmode (this->hidden->use_vidmode) 190 #define use_vidmode (this->hidden->use_vidmode)
191 #define use_xrandr (this->hidden->use_xrandr)
192 #define use_xme (this->hidden->use_xme)
188 #define currently_fullscreen (this->hidden->currently_fullscreen) 193 #define currently_fullscreen (this->hidden->currently_fullscreen)
189 #define switch_waiting (this->hidden->switch_waiting) 194 #define switch_waiting (this->hidden->switch_waiting)
190 #define switch_time (this->hidden->switch_time) 195 #define switch_time (this->hidden->switch_time)
191 #define blit_queued (this->hidden->blit_queued) 196 #define blit_queued (this->hidden->blit_queued)
192 #define SDL_DisplayColormap (this->hidden->DisplayColormap) 197 #define SDL_DisplayColormap (this->hidden->DisplayColormap)