Commit 4a30466e authored by Matthew D'Asaro's avatar Matthew D'Asaro Committed by Alexandre Julliard

winecfg: Add option to let wine decorate windows.

parent 4217fcb1
......@@ -64,7 +64,9 @@ FONT 8, "MS Shell Dlg"
BEGIN
GROUPBOX " Window Settings ",IDC_STATIC,8,4,244,184
CONTROL "Allow DirectX apps to stop the &mouse leaving their window",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,19,230,8
CONTROL "Allow DirectX apps to stop the &mouse leaving their window",IDC_DX_MOUSE_GRAB,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,20,230,8
CONTROL "Allow the window manager to &decorate the windows",IDC_ENABLE_DECORATED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,30,230,8
CONTROL "Allow the &window manager to control the windows",IDC_ENABLE_MANAGED,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,40,230,8
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.",
......
......@@ -143,6 +143,7 @@
/* graphics */
#define IDC_ENABLE_MANAGED 1100
#define IDC_ENABLE_DECORATED 1101
#define IDC_DX_MOUSE_GRAB 1102
#define IDC_USE_TAKE_FOCUS 1103
#define IDC_DOUBLE_BUFFER 1104
......
......@@ -147,6 +147,14 @@ static void init_dialog(HWND dialog)
CheckDlgButton(dialog, IDC_ENABLE_MANAGED, BST_UNCHECKED);
HeapFree(GetProcessHeap(), 0, buf);
buf = get_reg_key(config_key, keypath("X11 Driver"), "Decorated", "Y");
if (IS_OPTION_TRUE(*buf))
CheckDlgButton(dialog, IDC_ENABLE_DECORATED, BST_CHECKED);
else
CheckDlgButton(dialog, IDC_ENABLE_DECORATED, BST_UNCHECKED);
HeapFree(GetProcessHeap(), 0, buf);
SendDlgItemMessage(dialog, IDC_D3D_VSHADER_MODE, CB_RESETCONTENT, 0, 0);
for (it = 0; 0 != D3D_VS_Modes[it].displayStrID; ++it) {
SendDlgItemMessageW (dialog, IDC_D3D_VSHADER_MODE, CB_ADDSTRING, 0,
......@@ -225,6 +233,16 @@ static void on_enable_managed_clicked(HWND dialog) {
}
}
static void on_enable_decorated_clicked(HWND dialog) {
WINE_TRACE("\n");
if (IsDlgButtonChecked(dialog, IDC_ENABLE_DECORATED) == BST_CHECKED) {
set_reg_key(config_key, keypath("X11 Driver"), "Decorated", "Y");
} else {
set_reg_key(config_key, keypath("X11 Driver"), "Decorated", "N");
}
}
static void on_dx_mouse_grab_clicked(HWND dialog) {
if (IsDlgButtonChecked(dialog, IDC_DX_MOUSE_GRAB) == BST_CHECKED)
set_reg_key(config_key, keypath("X11 Driver"), "DXGrab", "Y");
......@@ -359,6 +377,7 @@ GraphDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
switch(LOWORD(wParam)) {
case IDC_ENABLE_DESKTOP: on_enable_desktop_clicked(hDlg); break;
case IDC_ENABLE_MANAGED: on_enable_managed_clicked(hDlg); break;
case IDC_ENABLE_DECORATED: on_enable_decorated_clicked(hDlg); break;
case IDC_DX_MOUSE_GRAB: on_dx_mouse_grab_clicked(hDlg); break;
case IDC_D3D_PSHADER_MODE: on_d3d_pshader_mode_clicked(hDlg); break;
}
......
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