mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Rebase against 5a8e430b96ab429a85f82f26ba9d2de4729954c2
This commit is contained in:
parent
42b756066b
commit
9e8d000f35
@ -1,4 +1,4 @@
|
||||
From 8397d7b777db5ef44825b639d4009f6e372ca9ad Mon Sep 17 00:00:00 2001
|
||||
From 1b741a4b555ad98a769fdb9fa659134b83293a4e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Fri, 4 Mar 2016 22:22:42 +0100
|
||||
Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
@ -12,10 +12,10 @@ Subject: [PATCH] ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps.
|
||||
5 files changed, 106 insertions(+)
|
||||
|
||||
diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c
|
||||
index 8247214..d70f2e2 100644
|
||||
index fad185e..ebf91b3 100644
|
||||
--- a/dlls/ddraw/ddraw.c
|
||||
+++ b/dlls/ddraw/ddraw.c
|
||||
@@ -1544,6 +1544,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
@@ -1543,6 +1543,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD
|
||||
caps.dwCaps |= DDCAPS_ALIGNSTRIDE;
|
||||
caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT;
|
||||
|
||||
@ -25,10 +25,10 @@ index 8247214..d70f2e2 100644
|
||||
|
||||
if(DriverCaps)
|
||||
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c
|
||||
index 1f93a97..9a862e1 100644
|
||||
index 59d07b7..5d81abb 100644
|
||||
--- a/dlls/ddraw/tests/ddraw1.c
|
||||
+++ b/dlls/ddraw/tests/ddraw1.c
|
||||
@@ -11543,6 +11543,31 @@ static void test_execute_data(void)
|
||||
@@ -11581,6 +11581,31 @@ static void test_execute_data(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ index 1f93a97..9a862e1 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -12030,6 +12055,7 @@ START_TEST(ddraw1)
|
||||
@@ -12068,6 +12093,7 @@ START_TEST(ddraw1)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@ -69,10 +69,10 @@ index 1f93a97..9a862e1 100644
|
||||
test_viewport();
|
||||
test_find_device();
|
||||
diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c
|
||||
index 95cdf8b..d317cc1 100644
|
||||
index 8b9b249..b9b964d 100644
|
||||
--- a/dlls/ddraw/tests/ddraw2.c
|
||||
+++ b/dlls/ddraw/tests/ddraw2.c
|
||||
@@ -12805,6 +12805,31 @@ static void test_enum_surfaces(void)
|
||||
@@ -12862,6 +12862,31 @@ static void test_enum_surfaces(void)
|
||||
IDirectDraw2_Release(ddraw);
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ index 95cdf8b..d317cc1 100644
|
||||
static void test_viewport(void)
|
||||
{
|
||||
static struct
|
||||
@@ -13321,6 +13346,7 @@ START_TEST(ddraw2)
|
||||
@@ -13378,6 +13403,7 @@ START_TEST(ddraw2)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@ -113,11 +113,11 @@ index 95cdf8b..d317cc1 100644
|
||||
test_find_device();
|
||||
test_killfocus();
|
||||
diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c
|
||||
index a62aaf0..e11ec0c 100644
|
||||
index 1c48418..306f233 100644
|
||||
--- a/dlls/ddraw/tests/ddraw4.c
|
||||
+++ b/dlls/ddraw/tests/ddraw4.c
|
||||
@@ -15318,6 +15318,31 @@ static void test_killfocus(void)
|
||||
UnregisterClassA("ddraw_killfocus_wndproc_wc", GetModuleHandleA(NULL));
|
||||
@@ -15472,6 +15472,31 @@ static void test_sysmem_draw(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@ -148,7 +148,7 @@ index a62aaf0..e11ec0c 100644
|
||||
START_TEST(ddraw4)
|
||||
{
|
||||
DDDEVICEIDENTIFIER identifier;
|
||||
@@ -15443,6 +15468,7 @@ START_TEST(ddraw4)
|
||||
@@ -15597,6 +15622,7 @@ START_TEST(ddraw4)
|
||||
test_depth_readback();
|
||||
test_clear();
|
||||
test_enum_surfaces();
|
||||
@ -157,11 +157,11 @@ index a62aaf0..e11ec0c 100644
|
||||
test_find_device();
|
||||
test_killfocus();
|
||||
diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c
|
||||
index 04048d4..ad4f63d 100644
|
||||
index a125200..da777d8 100644
|
||||
--- a/dlls/ddraw/tests/ddraw7.c
|
||||
+++ b/dlls/ddraw/tests/ddraw7.c
|
||||
@@ -15106,6 +15106,31 @@ static void test_killfocus(void)
|
||||
UnregisterClassA("ddraw_killfocus_wndproc_wc", GetModuleHandleA(NULL));
|
||||
@@ -15198,6 +15198,31 @@ static void test_sysmem_draw(void)
|
||||
DestroyWindow(window);
|
||||
}
|
||||
|
||||
+static void test_caps(void)
|
||||
@ -192,14 +192,14 @@ index 04048d4..ad4f63d 100644
|
||||
START_TEST(ddraw7)
|
||||
{
|
||||
DDDEVICEIDENTIFIER2 identifier;
|
||||
@@ -15243,6 +15268,7 @@ START_TEST(ddraw7)
|
||||
@@ -15335,6 +15360,7 @@ START_TEST(ddraw7)
|
||||
test_enum_surfaces();
|
||||
test_viewport();
|
||||
test_device_load();
|
||||
+ test_caps();
|
||||
test_color_vertex();
|
||||
test_killfocus();
|
||||
}
|
||||
test_sysmem_draw();
|
||||
--
|
||||
1.9.1
|
||||
|
||||
|
@ -52,7 +52,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "4397d9497608a3df45a5c519a37f5dcde5cc2301"
|
||||
echo "5a8e430b96ab429a85f82f26ba9d2de4729954c2"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
@ -317,7 +317,6 @@ patch_enable_all ()
|
||||
enable_user32_Refresh_MDI_Menus="$1"
|
||||
enable_user32_ScrollWindowEx="$1"
|
||||
enable_user32_ShowWindow="$1"
|
||||
enable_user32_dialog_focus="$1"
|
||||
enable_user32_msgbox_Support_WM_COPY_mesg="$1"
|
||||
enable_uxtheme_CloseThemeClass="$1"
|
||||
enable_uxtheme_GTK_Theming="$1"
|
||||
@ -1111,9 +1110,6 @@ patch_enable ()
|
||||
user32-ShowWindow)
|
||||
enable_user32_ShowWindow="$2"
|
||||
;;
|
||||
user32-dialog_focus)
|
||||
enable_user32_dialog_focus="$2"
|
||||
;;
|
||||
user32-msgbox-Support-WM_COPY-mesg)
|
||||
enable_user32_msgbox_Support_WM_COPY_mesg="$2"
|
||||
;;
|
||||
@ -6520,21 +6516,6 @@ if test "$enable_user32_ShowWindow" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-dialog_focus
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#46215] File Open Dialog fails to set focus to Filename text box
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/user32/dialog.c, dlls/user32/tests/dialog.c
|
||||
# |
|
||||
if test "$enable_user32_dialog_focus" -eq 1; then
|
||||
patch_apply user32-dialog_focus/0001-user32-Dont-reset-focus-if-current-control-is-a-chil.patch
|
||||
(
|
||||
printf '%s\n' '+ { "Alistair Leslie-Hughes", "user32: Dont reset focus if current dialog is a child.", 2 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset user32-msgbox-Support-WM_COPY-mesg
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -1,127 +0,0 @@
|
||||
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
Subject: [PATCH v2] user32: Dont reset focus if current dialog is a child.
|
||||
Message-Id: <PS2P216MB0066A5295ACFD65599E9D23E93A10@PS2P216MB0066.KORP216.PROD.OUTLOOK.COM>
|
||||
Date: Fri, 14 Dec 2018 04:00:43 +0000
|
||||
|
||||
Regression of 44f89322ba8825a8e4851aaaf7de89910701ca75
|
||||
|
||||
The standard File Open Dialog, creates an empty WS_EX_CONTROLPARENT
|
||||
child dialog which shouldn't receive focus.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46215
|
||||
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
|
||||
---
|
||||
dlls/user32/dialog.c | 5 +++-
|
||||
dlls/user32/tests/dialog.c | 72 ++++++++++++++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 76 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/user32/dialog.c b/dlls/user32/dialog.c
|
||||
index 0b33a57..72e6eee 100644
|
||||
--- a/dlls/user32/dialog.c
|
||||
+++ b/dlls/user32/dialog.c
|
||||
@@ -692,7 +692,10 @@ static HWND DIALOG_CreateIndirect( HINSTANCE hInst, LPCVOID dlgTemplate,
|
||||
SetFocus( focus );
|
||||
}
|
||||
else
|
||||
- SetFocus( hwnd );
|
||||
+ {
|
||||
+ if (!(template.style & WS_CHILD))
|
||||
+ SetFocus( hwnd );
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/dlls/user32/tests/dialog.c b/dlls/user32/tests/dialog.c
|
||||
index 631f3d3..ff6052f 100644
|
||||
--- a/dlls/user32/tests/dialog.c
|
||||
+++ b/dlls/user32/tests/dialog.c
|
||||
@@ -907,6 +907,55 @@ static INT_PTR CALLBACK focusDlgWinProc (HWND hDlg, UINT uiMsg, WPARAM wParam,
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+static INT_PTR CALLBACK EmptyProcUserTemplate(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
+{
|
||||
+ switch(uMsg) {
|
||||
+ case WM_INITDIALOG:
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
+HWND hChildDlg = NULL;
|
||||
+static INT_PTR CALLBACK focusChildDlgWinProc (HWND hwnd, UINT uiMsg, WPARAM wParam,
|
||||
+ LPARAM lParam)
|
||||
+{
|
||||
+ switch (uiMsg)
|
||||
+ {
|
||||
+ case WM_INITDIALOG:
|
||||
+ {
|
||||
+ RECT rectHwnd;
|
||||
+ struct {
|
||||
+ DLGTEMPLATE tmplate;
|
||||
+ WORD menu,class,title;
|
||||
+ } temp;
|
||||
+
|
||||
+ SetFocus( GetDlgItem(hwnd, 200) );
|
||||
+
|
||||
+ GetClientRect(hwnd,&rectHwnd);
|
||||
+ temp.tmplate.style = WS_CHILD | WS_CLIPSIBLINGS | WS_VISIBLE | DS_CONTROL | DS_3DLOOK;
|
||||
+ temp.tmplate.dwExtendedStyle = 0;
|
||||
+ temp.tmplate.cdit = 0;
|
||||
+ temp.tmplate.x = 0;
|
||||
+ temp.tmplate.y = 0;
|
||||
+ temp.tmplate.cx = 0;
|
||||
+ temp.tmplate.cy = 0;
|
||||
+ temp.menu = temp.class = temp.title = 0;
|
||||
+
|
||||
+ hChildDlg = CreateDialogIndirectParamA(g_hinst, &temp.tmplate,
|
||||
+ hwnd, (DLGPROC)EmptyProcUserTemplate, 0);
|
||||
+ ok(hChildDlg != 0, "Failed to create test dialog.\n");
|
||||
+
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ case WM_CLOSE:
|
||||
+ DestroyWindow(hChildDlg);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
+ return FALSE;
|
||||
+}
|
||||
+
|
||||
/* Helper for InitialFocusTest */
|
||||
static const char * GetHwndString(HWND hw)
|
||||
{
|
||||
@@ -1093,6 +1142,29 @@ static void test_focus(void)
|
||||
|
||||
DestroyWindow(hDlg);
|
||||
}
|
||||
+
|
||||
+ /* Test 6:
|
||||
+ * Select textbox's text on creation when WM_INITDIALOG creates a child dialog. */
|
||||
+ {
|
||||
+ HWND hDlg;
|
||||
+ HRSRC hResource;
|
||||
+ HANDLE hTemplate;
|
||||
+ DLGTEMPLATE* pTemplate;
|
||||
+ HWND edit;
|
||||
+
|
||||
+ hResource = FindResourceA(g_hinst,"FOCUS_TEST_DIALOG_3", (LPCSTR)RT_DIALOG);
|
||||
+ hTemplate = LoadResource(g_hinst, hResource);
|
||||
+ pTemplate = LockResource(hTemplate);
|
||||
+
|
||||
+ hDlg = CreateDialogIndirectParamA(g_hinst, pTemplate, NULL, focusChildDlgWinProc, 0);
|
||||
+ ok(hDlg != 0, "Failed to create test dialog.\n");
|
||||
+ edit = GetDlgItem(hDlg, 200);
|
||||
+
|
||||
+ ok(GetFocus() == edit, "Focus not set to edit, focus=%p, dialog=%p, edit=%p\n",
|
||||
+ GetFocus(), hDlg, edit);
|
||||
+
|
||||
+ DestroyWindow(hDlg);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void test_GetDlgItemText(void)
|
||||
|
||||
--
|
||||
1.9.1
|
||||
|
@ -1 +0,0 @@
|
||||
Fixes: [46215] File Open Dialog fails to set focus to Filename text box
|
Loading…
Reference in New Issue
Block a user