mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-01-28 22:04:43 -08:00
Added patch to use assembler wrapper to call MONITORENUMPROC callback.
This commit is contained in:
parent
f8e36a7305
commit
b3908c3ae3
@ -348,6 +348,7 @@ patch_enable_all ()
|
||||
enable_winex11_CandidateWindowPos="$1"
|
||||
enable_winex11_Clipboard_HTML="$1"
|
||||
enable_winex11_DefaultDisplayFrequency="$1"
|
||||
enable_winex11_MONITORENUMPROC="$1"
|
||||
enable_winex11_Window_Groups="$1"
|
||||
enable_winex11_Window_Style="$1"
|
||||
enable_winex11_XEMBED="$1"
|
||||
@ -1190,6 +1191,9 @@ patch_enable ()
|
||||
winex11-DefaultDisplayFrequency)
|
||||
enable_winex11_DefaultDisplayFrequency="$2"
|
||||
;;
|
||||
winex11-MONITORENUMPROC)
|
||||
enable_winex11_MONITORENUMPROC="$2"
|
||||
;;
|
||||
winex11-Window_Groups)
|
||||
enable_winex11_Window_Groups="$2"
|
||||
;;
|
||||
@ -6854,6 +6858,21 @@ if test "$enable_winex11_DefaultDisplayFrequency" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winex11-MONITORENUMPROC
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#24421] Use assembler wrapper to call MONITORENUMPROC callback
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/winex11.drv/xinerama.c
|
||||
# |
|
||||
if test "$enable_winex11_MONITORENUMPROC" -eq 1; then
|
||||
patch_apply winex11-MONITORENUMPROC/0001-winex11.drv-Use-assembler-wrapper-to-call-MONITORENU.patch
|
||||
(
|
||||
echo '+ { "Sebastian Lackner", "winex11.drv: Use assembler wrapper to call MONITORENUMPROC callback.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset winex11-Window_Groups
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@ -0,0 +1,65 @@
|
||||
From c02ba27cd7b2a59b3ad636184602077048dce128 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Fri, 12 Feb 2016 00:08:32 +0100
|
||||
Subject: winex11.drv: Use assembler wrapper to call MONITORENUMPROC callback.
|
||||
|
||||
---
|
||||
dlls/winex11.drv/xinerama.c | 28 ++++++++++++++++++++++++++--
|
||||
1 file changed, 26 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/xinerama.c b/dlls/winex11.drv/xinerama.c
|
||||
index 7e28726..93fb9be 100644
|
||||
--- a/dlls/winex11.drv/xinerama.c
|
||||
+++ b/dlls/winex11.drv/xinerama.c
|
||||
@@ -243,6 +243,30 @@ BOOL CDECL X11DRV_GetMonitorInfo( HMONITOR handle, LPMONITORINFO info )
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+#ifdef __i386__
|
||||
+/* MJ's Help Diagnostic expects that %ecx contains the address to rect,
|
||||
+ * so we need a small assembly wrapper to call the proc. */
|
||||
+extern BOOL enum_monitor_wrapper( void *callback, HMONITOR monitor, HDC hdc, RECT *rect, LPARAM data );
|
||||
+__ASM_GLOBAL_FUNC( enum_monitor_wrapper,
|
||||
+ "pushl %ebp\n\t"
|
||||
+ __ASM_CFI(".cfi_adjust_cfa_offset 4\n\t")
|
||||
+ __ASM_CFI(".cfi_rel_offset %ebp,0\n\t")
|
||||
+ "movl %esp,%ebp\n\t"
|
||||
+ __ASM_CFI(".cfi_def_cfa_register %ebp\n\t")
|
||||
+ "subl $8,%esp\n\t"
|
||||
+ "pushl 24(%ebp)\n\t"
|
||||
+ "pushl 20(%ebp)\n\t"
|
||||
+ "pushl 16(%ebp)\n\t"
|
||||
+ "pushl 12(%ebp)\n\t"
|
||||
+ "movl 20(%ebp),%ecx\n\t"
|
||||
+ "call *8(%ebp)\n\t"
|
||||
+ "leave\n\t"
|
||||
+ __ASM_CFI(".cfi_def_cfa %esp,4\n\t")
|
||||
+ __ASM_CFI(".cfi_same_value %ebp\n\t")
|
||||
+ "ret" )
|
||||
+#else
|
||||
+#define enum_monitor_wrapper( callback, monitor, hdc, rect, data ) (callback)( (monitor), (hdc), (rect), (data) )
|
||||
+#endif
|
||||
|
||||
/***********************************************************************
|
||||
* X11DRV_EnumDisplayMonitors (X11DRV.@)
|
||||
@@ -266,7 +290,7 @@ BOOL CDECL X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC pro
|
||||
RECT monrect = monitors[i].rcMonitor;
|
||||
OffsetRect( &monrect, -origin.x, -origin.y );
|
||||
if (IntersectRect( &monrect, &monrect, &limit ))
|
||||
- if (!proc( index_to_monitor(i), hdc, &monrect, lp ))
|
||||
+ if (!enum_monitor_wrapper( proc, index_to_monitor(i), hdc, &monrect, lp ))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
@@ -276,7 +300,7 @@ BOOL CDECL X11DRV_EnumDisplayMonitors( HDC hdc, LPRECT rect, MONITORENUMPROC pro
|
||||
{
|
||||
RECT unused;
|
||||
if (!rect || IntersectRect( &unused, &monitors[i].rcMonitor, rect ))
|
||||
- if (!proc( index_to_monitor(i), 0, &monitors[i].rcMonitor, lp ))
|
||||
+ if (!enum_monitor_wrapper( proc, index_to_monitor(i), 0, &monitors[i].rcMonitor, lp ))
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
--
|
||||
2.7.1
|
||||
|
1
patches/winex11-MONITORENUMPROC/definition
Normal file
1
patches/winex11-MONITORENUMPROC/definition
Normal file
@ -0,0 +1 @@
|
||||
Fixes: [24421] Use assembler wrapper to call MONITORENUMPROC callback
|
Loading…
x
Reference in New Issue
Block a user