You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-12-15 08:03:15 -08:00
Rebase against d62035da4aa91327c6e38a2c8a66b829eb0983ed.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 6e42e27181a16cc0b427e3504ec3ac8b7ab21f65 Mon Sep 17 00:00:00 2001
|
||||
From 6d5290b821d6fa6d0690b5df96653d8898476da6 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 13 Nov 2014 06:43:43 +0100
|
||||
Subject: [PATCH] user32: Fix handling of invert_y in DrawTextExW.
|
||||
@@ -8,10 +8,10 @@ Subject: [PATCH] user32: Fix handling of invert_y in DrawTextExW.
|
||||
1 file changed, 15 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/dlls/user32/text.c b/dlls/user32/text.c
|
||||
index dd9d711cd48..647fff30c30 100644
|
||||
index c86593ffafb..44644261278 100644
|
||||
--- a/dlls/user32/text.c
|
||||
+++ b/dlls/user32/text.c
|
||||
@@ -909,6 +909,15 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
@@ -914,6 +914,15 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
if (dtp && dtp->cbSize != sizeof(DRAWTEXTPARAMS))
|
||||
return 0;
|
||||
|
||||
@@ -27,7 +27,7 @@ index dd9d711cd48..647fff30c30 100644
|
||||
if (count == -1)
|
||||
{
|
||||
count = lstrlenW(str);
|
||||
@@ -918,7 +927,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
@@ -923,7 +932,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
{
|
||||
rect->right = rect->left;
|
||||
if( flags & DT_SINGLELINE)
|
||||
@@ -36,7 +36,7 @@ index dd9d711cd48..647fff30c30 100644
|
||||
else
|
||||
rect->bottom = rect->top;
|
||||
}
|
||||
@@ -926,15 +935,6 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
@@ -931,15 +940,6 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ index dd9d711cd48..647fff30c30 100644
|
||||
if (dtp)
|
||||
{
|
||||
lmargin = dtp->iLeftMargin;
|
||||
@@ -982,9 +982,10 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
@@ -991,9 +991,10 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
|
||||
if (flags & DT_SINGLELINE)
|
||||
{
|
||||
@@ -66,7 +66,7 @@ index dd9d711cd48..647fff30c30 100644
|
||||
}
|
||||
|
||||
if (!(flags & DT_CALCRECT))
|
||||
@@ -1042,10 +1043,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
@@ -1051,10 +1052,7 @@ INT WINAPI DrawTextExW( HDC hdc, LPWSTR str, INT i_count,
|
||||
else if (size.cx > max_width)
|
||||
max_width = size.cx;
|
||||
|
||||
@@ -75,9 +75,9 @@ index dd9d711cd48..647fff30c30 100644
|
||||
- else
|
||||
- y += lh;
|
||||
+ y += invert_y ? -lh : lh;
|
||||
if (dtp)
|
||||
dtp->uiLengthDrawn += len;
|
||||
}
|
||||
while (strPtr && !last_line);
|
||||
|
||||
--
|
||||
2.28.0
|
||||
2.51.0
|
||||
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
From cd5537909157f06d1f163c8d2b6583867a1fd2ee Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Gabriel=20Iv=C4=83ncescu?= <gabrielopcode@gmail.com>
|
||||
Date: Mon, 24 Dec 2018 14:26:57 +0200
|
||||
Subject: [PATCH] winex11.drv/window: Query the X server for the actual rect of
|
||||
the window before unmapping it
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Some applications control their own position when they are being moved. This
|
||||
can become out of sync with the X server because certain WMs interfere with
|
||||
this on purpose.
|
||||
|
||||
Thus we shouldn't just rely on our window rect when deciding whether to unmap
|
||||
a window (if it's out of the screen), but query the X server in this case
|
||||
as the last resort to make sure it really is outside and should be unmapped.
|
||||
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=15346
|
||||
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
|
||||
---
|
||||
dlls/winex11.drv/window.c | 22 +++++++++++++++++++++-
|
||||
1 file changed, 21 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
|
||||
index a733d566d4f..c67344edf5b 100644
|
||||
--- a/dlls/winex11.drv/window.c
|
||||
+++ b/dlls/winex11.drv/window.c
|
||||
@@ -389,6 +389,25 @@ static struct x11drv_win_data *alloc_win_data( Display *display, HWND hwnd )
|
||||
return data;
|
||||
}
|
||||
|
||||
+static BOOL is_actual_window_rect_mapped(const struct x11drv_win_data *data)
|
||||
+{
|
||||
+ XWindowAttributes attr;
|
||||
+ Window child;
|
||||
+ RECT rect;
|
||||
+ POINT pt;
|
||||
+ int x, y;
|
||||
+
|
||||
+ /* Query the X server for the actual position of the window,
|
||||
+ as some WMs tend to mess with it, so we need to make sure
|
||||
+ we aren't unmapping the window wrongly with a bogus rect */
|
||||
+ XTranslateCoordinates(data->display, data->whole_window, root_window, 0, 0, &x, &y, &child);
|
||||
+ XGetWindowAttributes(data->display, data->whole_window, &attr);
|
||||
+
|
||||
+ pt = root_to_virtual_screen(x - attr.x, y - attr.y);
|
||||
+ SetRect(&rect, pt.x, pt.y, pt.x + attr.width, pt.y + attr.height);
|
||||
+ return is_window_rect_mapped(&rect);
|
||||
+}
|
||||
+
|
||||
|
||||
/***********************************************************************
|
||||
* is_window_managed
|
||||
@@ -3042,7 +3061,8 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN
|
||||
if (old_style & WS_VISIBLE)
|
||||
{
|
||||
if (((swp_flags & SWP_HIDEWINDOW) && !(new_style & WS_VISIBLE)) ||
|
||||
- (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_rects.window )))
|
||||
+ (!(new_style & WS_MINIMIZE) && !is_window_rect_mapped( &new_rects->window ) && is_window_rect_mapped( &old_rects.window ) &
|
||||
+ !is_actual_window_rect_mapped( data )))
|
||||
{
|
||||
window_set_wm_state( data, WithdrawnState, FALSE );
|
||||
release_win_data( data );
|
||||
--
|
||||
2.47.2
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
Fixes: [15346] winex11.drv: Query the X server for the actual rect of the window before unmapping it
|
||||
@@ -1 +1 @@
|
||||
d76b59d5c021ea5da49d1e1430c1d33bee874418
|
||||
d62035da4aa91327c6e38a2c8a66b829eb0983ed
|
||||
|
||||
Reference in New Issue
Block a user