x11drv: Get rid of the using_wine_desktop flag.

This commit is contained in:
Alexandre Julliard 2006-03-27 15:33:43 +02:00
parent 90af5a0d17
commit 6bb18e24e9
5 changed files with 10 additions and 12 deletions

View File

@ -119,9 +119,10 @@ BOOL X11DRV_is_window_rect_mapped( const RECT *rect )
*
* Fill the window attributes structure for an X window.
*/
static int get_window_attributes( struct x11drv_win_data *data, XSetWindowAttributes *attr )
static int get_window_attributes( Display *display, struct x11drv_win_data *data,
XSetWindowAttributes *attr )
{
if (!data->managed && !using_wine_desktop && is_window_managed( data->hwnd ))
if (!data->managed && (root_window == DefaultRootWindow( display )) && is_window_managed( data->hwnd ))
{
data->managed = TRUE;
SetPropA( data->hwnd, managed_prop, (HANDLE)1 );
@ -142,7 +143,7 @@ static int get_window_attributes( struct x11drv_win_data *data, XSetWindowAttrib
void X11DRV_sync_window_style( Display *display, struct x11drv_win_data *data )
{
XSetWindowAttributes attr;
int mask = get_window_attributes( data, &attr );
int mask = get_window_attributes( display, data, &attr );
wine_tsx11_lock();
if (data->whole_window != DefaultRootWindow(display))
@ -654,7 +655,7 @@ static Window create_whole_window( Display *display, struct x11drv_win_data *dat
if (!(cx = rect.right - rect.left)) cx = 1;
if (!(cy = rect.bottom - rect.top)) cy = 1;
mask = get_window_attributes( data, &attr );
mask = get_window_attributes( display, data, &attr );
/* set the attributes that don't change over the lifetime of the window */
attr.bit_gravity = NorthWestGravity;

View File

@ -262,7 +262,6 @@ extern int client_side_with_render;
extern int client_side_antialias_with_core;
extern int client_side_antialias_with_render;
extern int using_client_side_fonts;
extern int using_wine_desktop;
extern void X11DRV_XRender_Init(void);
extern void X11DRV_XRender_Finalize(void);
extern BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE*, HFONT);

View File

@ -82,7 +82,6 @@ int client_side_with_core = 1;
int client_side_with_render = 1;
int client_side_antialias_with_core = 1;
int client_side_antialias_with_render = 1;
int using_wine_desktop = 0;
int copy_default_colors = 128;
int alloc_system_colors = 256;
DWORD thread_data_tls_index = TLS_OUT_OF_INDEXES;
@ -424,7 +423,6 @@ static BOOL process_attach(void)
if (desktop_geometry)
{
root_window = X11DRV_create_desktop( desktop_vi, desktop_geometry );
using_wine_desktop = 1;
}
if(desktop_vi)
XFree(desktop_vi);

View File

@ -254,7 +254,7 @@ void X11DRV_XRandR_Init(void)
if (xrandr_major) return; /* already initialized? */
if (!usexrandr) return; /* disabled in config */
if (using_wine_desktop) return; /* not compatible with desktop mode */
if (root_window != DefaultRootWindow( gdi_display )) return;
if (!load_xrandr()) return; /* can't load the Xrandr library */
/* see if Xrandr is available */

View File

@ -172,14 +172,14 @@ void X11DRV_XF86VM_Init(void)
#endif /* X_XF86VidModeSetGammaRamp */
/* retrieve modes */
if (!using_wine_desktop) ok = XF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &real_xf86vm_modes);
if (root_window == DefaultRootWindow( gdi_display ))
ok = XF86VidModeGetAllModeLines(gdi_display, DefaultScreen(gdi_display), &nmodes, &real_xf86vm_modes);
else
ok = FALSE; /* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */
}
wine_tsx11_unlock();
if (!ok) return;
/* In desktop mode, do not switch resolution... But still use the Gamma ramp stuff */
if (using_wine_desktop) return;
TRACE("XVidMode modes: count=%d\n", nmodes);
real_xf86vm_mode_count = nmodes;