Commit e2db7ef7 authored by Gijs Vermeulen's avatar Gijs Vermeulen Committed by Alexandre Julliard

winecfg: Disable virtual desktop when using macdrv.

parent d949b66d
......@@ -111,17 +111,44 @@ static void update_gui_for_desktop_mode(HWND dialog)
updating_ui = FALSE;
}
static BOOL can_enable_desktop(void)
{
char *value;
UINT guid_atom;
BOOL ret = FALSE;
char key[sizeof("System\\CurrentControlSet\\Control\\Video\\{}\\0000") + 40];
guid_atom = HandleToULong(GetPropA(GetDesktopWindow(), "__wine_display_device_guid"));
strcpy( key, "System\\CurrentControlSet\\Control\\Video\\{" );
if (!GlobalGetAtomNameA(guid_atom, key + strlen(key), 40)) return ret;
strcat( key, "}\\0000" );
if ((value = get_reg_key(HKEY_LOCAL_MACHINE, key, "GraphicsDriver", NULL)))
{
if(strcmp(value, "winemac.drv"))
ret = TRUE;
HeapFree(GetProcessHeap(), 0, value);
}
return ret;
}
static void init_dialog(HWND dialog)
{
char* buf;
BOOL enable_desktop;
convert_x11_desktop_key();
update_gui_for_desktop_mode(dialog);
if ((enable_desktop = can_enable_desktop()))
update_gui_for_desktop_mode(dialog);
else
disable(IDC_ENABLE_DESKTOP);
updating_ui = TRUE;
SendDlgItemMessageW(dialog, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0);
SendDlgItemMessageW(dialog, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
if (enable_desktop)
{
SendDlgItemMessageW(dialog, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0);
SendDlgItemMessageW(dialog, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
}
buf = get_reg_key(config_key, keypath("X11 Driver"), "GrabFullscreen", "N");
if (IS_OPTION_TRUE(*buf))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment