Module: wine
Branch: master
Commit: 2581e0b3eab4638b8aa00be9e66543b7e39f3dc6
URL: https://gitlab.winehq.org/wine/wine/-/commit/2581e0b3eab4638b8aa00be9e66543…
Author: Rémi Bernon <rbernon(a)codeweavers.com>
Date: Tue Oct 10 18:11:43 2023 +0200
server: Send WM_WINE_SETCURSOR with the thread input cursor handle.
Which may be different from the last desktop cursor handle.
This makes the behavior better match the old winex11 behavior, which queried
the current thread input cursor handle on every mouse move to sync it with X11,
although it contradicts MSDN documentation which states that the cursor handle
is global.
This fixes the X11 cursor being visible in "Deus Ex: GOTY Edition".
---
server/queue.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/server/queue.c b/server/queue.c
index fcc946ff0cb..0558bd111f9 100644
--- a/server/queue.c
+++ b/server/queue.c
@@ -436,6 +436,15 @@ static int update_desktop_cursor_window( struct desktop *desktop, user_handle_t
desktop->cursor.win = win;
if (updated)
{
+ struct thread *thread;
+
+ if ((thread = get_window_thread( win )))
+ {
+ struct thread_input *input = thread->queue->input;
+ if (input) handle = input->cursor_count < 0 ? 0 : input->cursor;
+ release_object( thread );
+ }
+
/* when clipping send the message to the foreground window as well, as some driver have an artificial overlay window */
if (is_cursor_clipped( desktop )) queue_cursor_message( desktop, 0, WM_WINE_SETCURSOR, win, handle );
queue_cursor_message( desktop, win, WM_WINE_SETCURSOR, win, handle );
Module: wine
Branch: master
Commit: 70c9239cb2eef696eea109f3f8e7a58f80cd3823
URL: https://gitlab.winehq.org/wine/wine/-/commit/70c9239cb2eef696eea109f3f8e7a5…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com>
Date: Mon Aug 14 17:17:05 2023 +0800
winex11.drv: Set _NET_WM_FULLSCREEN_MONITORS only when necessary.
If _NET_WM_FULLSCREEN_MONITORS is set then the property needs to be updated because it can't
be deleted by sending a _NET_WM_FULLSCREEN_MONITORS client message to the root window
according to the wm-spec version 1.5. Having the window spanning more than two monitors also
needs the property set. In other cases, _NET_WM_FULLSCREEN_MONITORS doesn't need to be set.
What's more, setting _NET_WM_FULLSCREEN_MONITORS adds a constraint on Mutter so that such a
window can't be moved to another monitor by using the Shift+Super+Up/Down/Left/Right
shortcut. So the property should be added only when necessary.
---
dlls/winex11.drv/window.c | 15 +++++++++++++++
dlls/winex11.drv/x11drv.h | 1 +
2 files changed, 16 insertions(+)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index ed3728773af..53982bb8c3b 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -993,6 +993,20 @@ static void update_net_wm_fullscreen_monitors( struct x11drv_win_data *data )
if (!xinerama_get_fullscreen_monitors( &data->whole_rect, monitors ))
return;
+ /* If _NET_WM_FULLSCREEN_MONITORS is not set and the fullscreen monitors are spanning only one
+ * monitor then do not set _NET_WM_FULLSCREEN_MONITORS.
+ *
+ * If _NET_WM_FULLSCREEN_MONITORS is set then the property needs to be updated because it can't
+ * be deleted by sending a _NET_WM_FULLSCREEN_MONITORS client message to the root window
+ * according to the wm-spec version 1.5. Having the window spanning more than two monitors also
+ * needs the property set. In other cases, _NET_WM_FULLSCREEN_MONITORS doesn't need to be set.
+ * What's more, setting _NET_WM_FULLSCREEN_MONITORS adds a constraint on Mutter so that such a
+ * window can't be moved to another monitor by using the Shift+Super+Up/Down/Left/Right
+ * shortcut. So the property should be added only when necessary. */
+ if (monitors[0] == monitors[1] && monitors[1] == monitors[2] && monitors[2] == monitors[3]
+ && !data->net_wm_fullscreen_monitors_set)
+ return;
+
if (!data->mapped)
{
XChangeProperty( data->display, data->whole_window, x11drv_atom(_NET_WM_FULLSCREEN_MONITORS),
@@ -1012,6 +1026,7 @@ static void update_net_wm_fullscreen_monitors( struct x11drv_win_data *data )
XSendEvent( data->display, root_window, False,
SubstructureRedirectMask | SubstructureNotifyMask, &xev );
}
+ data->net_wm_fullscreen_monitors_set = TRUE;
}
/***********************************************************************
diff --git a/dlls/winex11.drv/x11drv.h b/dlls/winex11.drv/x11drv.h
index 8e233a051f4..e80cb6682bf 100644
--- a/dlls/winex11.drv/x11drv.h
+++ b/dlls/winex11.drv/x11drv.h
@@ -625,6 +625,7 @@ struct x11drv_win_data
BOOL use_alpha : 1; /* does window use an alpha channel? */
BOOL skip_taskbar : 1; /* does window should be deleted from taskbar */
BOOL add_taskbar : 1; /* does window should be added to taskbar regardless of style */
+ BOOL net_wm_fullscreen_monitors_set : 1; /* is _NET_WM_FULLSCREEN_MONITORS set */
int wm_state; /* current value of the WM_STATE property */
DWORD net_wm_state; /* bit mask of active x11drv_net_wm_state values */
Window embedder; /* window id of embedder */
Module: wine
Branch: master
Commit: 81fa8615eb23c994724d809182f521b2eba310af
URL: https://gitlab.winehq.org/wine/wine/-/commit/81fa8615eb23c994724d809182f521…
Author: Piotr Caban <piotr(a)codeweavers.com>
Date: Tue Oct 10 15:36:19 2023 +0200
include: Add winppi.h header.
---
include/Makefile.in | 1 +
include/winppi.h | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 40 insertions(+)
diff --git a/include/Makefile.in b/include/Makefile.in
index ef0c48ed9ef..4fdee0c9b91 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -936,6 +936,7 @@ SOURCES = \
winnt.h \
winnt.rh \
winperf.h \
+ winppi.h \
winreg.h \
winresrc.h \
winsafer.h \
diff --git a/include/winppi.h b/include/winppi.h
new file mode 100644
index 00000000000..0cb04593c08
--- /dev/null
+++ b/include/winppi.h
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2023 Piotr Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _WINPPI_
+#define _WINPPI_
+
+HANDLE WINAPI GdiGetSpoolFileHandle(LPWSTR pwszPrinterName,
+ LPDEVMODEW pDevmode, LPWSTR pwszDocName);
+BOOL WINAPI GdiDeleteSpoolFileHandle(HANDLE SpoolFileHandle);
+DWORD WINAPI GdiGetPageCount(HANDLE SpoolFileHandle);
+HDC WINAPI GdiGetDC(HANDLE SpoolFileHandle);
+HANDLE WINAPI GdiGetPageHandle(HANDLE SpoolFileHandle,
+ DWORD Page, LPDWORD pdwPageType);
+BOOL WINAPI GdiStartDocEMF(HANDLE SpoolFileHandle, DOCINFOW *pDocInfo);
+BOOL WINAPI GdiStartPageEMF(HANDLE SpoolFileHandle);
+BOOL WINAPI GdiPlayPageEMF(HANDLE SpoolFileHandle, HANDLE hemf,
+ RECT *prectDocument, RECT *prectBorder, RECT *prectClip);
+BOOL WINAPI GdiEndPageEMF(HANDLE SpoolFileHandle, DWORD dwOptimization);
+BOOL WINAPI GdiEndDocEMF(HANDLE SpoolFileHandle);
+BOOL WINAPI GdiGetDevmodeForPage(HANDLE SpoolFileHandle, DWORD dwPageNumber,
+ PDEVMODEW *pCurrDM, PDEVMODEW *pLastDM);
+BOOL WINAPI GdiResetDCEMF(HANDLE SpoolFileHandle, PDEVMODEW pCurrDM);
+
+#endif /* _WINPPI_ */