- Implement "managed mode" setting.

- Make system colors setting work.
- Disable DGA setting, as enabling it breaks wine.
This commit is contained in:
Mike Hearn 2003-09-18 04:32:01 +00:00 committed by Alexandre Julliard
parent 16f4ededb6
commit 5d249cb225
4 changed files with 52 additions and 6 deletions

View File

@ -62,24 +62,36 @@ IDD_X11DRVCFG DIALOG DISCARDABLE 0, 0, 260, 250
STYLE WS_CHILD | WS_DISABLED
FONT 8, "MS Sans Serif"
BEGIN
/** DGA control is disabled until this feature isn't totally broken **/
/*
CONTROL "Use XFree DGA extension",IDC_XDGA,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,145,44,97,10
CONTROL "Enable Wine desktop",IDC_ENABLE_DESKTOP,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,17,110,84,10
*/
EDITTEXT IDC_DESKTOP_WIDTH,64,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
EDITTEXT IDC_DESKTOP_HEIGHT,117,125,40,14,ES_AUTOHSCROLL | ES_NUMBER | WS_DISABLED
GROUPBOX "Render Settings",IDC_STATIC,8,4,244,60
GROUPBOX " Render Settings ",IDC_STATIC,8,4,244,60
LTEXT "The driver color and render settings are used to optimise the way in which colors and applications are displayed.",
IDC_STATIC,15,17,228,22
LTEXT "Allocated system colors:",IDC_STATIC,15,43,76,8
EDITTEXT IDC_SYSCOLORS,90,41,40,14,ES_AUTOHSCROLL | ES_NUMBER
GROUPBOX "Wine Desktop",IDC_STATIC,8,65,244,83
LTEXT "Wine can be setup to emulate a windows desktop, or can be run in ""Managed"" mode (default) where the default X11 windows manager/environment is resposible for placing the windows.",
GROUPBOX " Window settings ",IDC_STATIC,8,65,244,170
/* FIXME: the wording of this explanation could be a lot better */
LTEXT "You can choose to emulate a windows desktop, where all the windows are confined to one 'virtual screen', or you can have the windows placed on your standard desktop.",
IDC_STATIC,15,77,228,28
LTEXT "Desktop size:",IDC_DESKTOP_SIZE,17,125,44,8,WS_DISABLED
LTEXT "X",IDC_DESKTOP_BY,108,125,8,8,WS_DISABLED
CONTROL "Emulate a virtual desktop",IDC_ENABLE_DESKTOP,"Button",
BS_AUTOCHECKBOX | WS_TABSTOP,17,110,84,10
LTEXT "If windows are managed by your window manager, then they will have the standard borders, they will respect your virtual desktop and appear in your window list. \n\nIf the windows are unmanaged, they will be disconnected from your window manager. This will mean the windows do not integrate as closely with your desktop, but the emulation will be more accurate so it can help some programs to work better.",
IDC_STATIC,15,145,228,50
CONTROL "Allow the window manager to control the windows", IDC_ENABLE_MANAGED, "Button",
BS_AUTOCHECKBOX | WS_TABSTOP, 17,215,154,10
END
IDD_DLLCFG DIALOG DISCARDABLE 0, 0, 260, 250

View File

@ -102,3 +102,4 @@
#define IDC_STATIC_LABEL 1073
#define IDC_ENABLE_DESKTOP 1074
#define IDS_DRIVE_NO_C 1075
#define IDC_ENABLE_MANAGED 1076

View File

@ -32,6 +32,9 @@
* - Multimedia page
* - Settings migration code (from old configs)
*
* Minor things that should be done someday:
* - Make the desktop size UI a combo box, with a Custom option, so it's more obvious what you might want to choose here
*
*/
#include <assert.h>

View File

@ -89,7 +89,17 @@ void initX11DrvDlg (HWND hDlg)
free(buf);
SendDlgItemMessage(hDlg, IDC_DESKTOP_WIDTH, EM_LIMITTEXT, RES_MAXLEN, 0);
SendDlgItemMessage(hDlg, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
SendDlgItemMessage(hDlg, IDC_DESKTOP_HEIGHT, EM_LIMITTEXT, RES_MAXLEN, 0);
buf = getConfigValue("x11drv", "AllocSysColors", "100");
SetWindowText(GetDlgItem(hDlg, IDC_SYSCOLORS), buf);
free(buf);
buf = getConfigValue("x11drv", "Managed", "Y");
if (IS_OPTION_TRUE(*buf))
CheckDlgButton(hDlg, IDC_ENABLE_MANAGED, BST_CHECKED);
else
CheckDlgButton(hDlg, IDC_ENABLE_MANAGED, BST_UNCHECKED);
updatingUI = FALSE;
}
@ -130,7 +140,25 @@ void onEnableDesktopClicked(HWND hDlg) {
}
updateGUIForDesktopMode(hDlg);
}
void onSysColorsChange(HWND hDlg) {
char *newvalue = getDialogItemText(hDlg, IDC_SYSCOLORS);
WINE_TRACE("\n");
if (updatingUI) return;
if (!newvalue) return;
addTransaction("x11drv", "AllocSystemColors", ACTION_SET, newvalue);
free(newvalue);
}
void onEnableManagedClicked(HWND hDlg) {
if (IsDlgButtonChecked(hDlg, IDC_ENABLE_MANAGED) == BST_CHECKED)
addTransaction("x11drv", "Managed", ACTION_SET, "Y");
else
addTransaction("x11drv", "Managed", ACTION_SET, "N");
}
INT_PTR CALLBACK
X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
@ -143,12 +171,14 @@ X11DrvDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
case EN_CHANGE: {
SendMessage(GetParent(hDlg), PSM_CHANGED, 0, 0);
if ( (LOWORD(wParam) == IDC_DESKTOP_WIDTH) || (LOWORD(wParam) == IDC_DESKTOP_HEIGHT) ) setFromDesktopSizeEdits(hDlg);
if (LOWORD(wParam) == IDC_SYSCOLORS) onSysColorsChange(hDlg);
break;
}
case BN_CLICKED: {
WINE_TRACE("%d\n", LOWORD(wParam));
switch(LOWORD(wParam)) {
case IDC_ENABLE_DESKTOP: onEnableDesktopClicked(hDlg); break;
case IDC_ENABLE_MANAGED: onEnableManagedClicked(hDlg); break;
};
break;
}