[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 88355de6022: Unbreak the Cygw32 build broken by resent WTS_SESSIO
From: |
Eli Zaretskii |
Subject: |
master 88355de6022: Unbreak the Cygw32 build broken by resent WTS_SESSION changes |
Date: |
Tue, 19 Mar 2024 08:48:25 -0400 (EDT) |
branch: master
commit 88355de6022458c3e890cc6d5da60d6f35fe8868
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Unbreak the Cygw32 build broken by resent WTS_SESSION changes
* src/w32xfns.c (WTS_VIRTUAL_CLASS):
* src/w32fns.c (WTS_VIRTUAL_CLASS, WM_WTSSESSION_CHANGE)
(WTS_SESSION_LOCK): Define only for WINDOWSNT.
* src/w32xfns.c (drain_message_queue): Call
'reset_w32_kbdhook_state' only for WINDOWSNT. (Bug#69888)
---
src/w32fns.c | 8 +++++---
src/w32xfns.c | 9 +++++++--
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/w32fns.c b/src/w32fns.c
index 7d288ce7bd5..ace8d1016a5 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -305,10 +305,12 @@ static unsigned int sound_type = 0xFFFFFFFF;
/* Special virtual key code for indicating "any" key. */
#define VK_ANY 0xFF
-#ifndef WM_WTSSESSION_CHANGE
+#ifdef WINDOWSNT
+# ifndef WM_WTSSESSION_CHANGE
/* 32-bit MinGW does not define these constants. */
-# define WM_WTSSESSION_CHANGE 0x02B1
-# define WTS_SESSION_LOCK 0x7
+# define WM_WTSSESSION_CHANGE 0x02B1
+# define WTS_SESSION_LOCK 0x7
+# endif
#endif
#ifndef WS_EX_NOACTIVATE
diff --git a/src/w32xfns.c b/src/w32xfns.c
index 853c8368118..b248697e658 100644
--- a/src/w32xfns.c
+++ b/src/w32xfns.c
@@ -22,9 +22,11 @@ along with GNU Emacs. If not, see
<https://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <windows.h>
#include <windowsx.h>
+
+#ifdef WINDOWSNT
/* Override API version to get the required functionality. */
-#undef _WIN32_WINNT
-#define _WIN32_WINNT 0x0501
+# undef _WIN32_WINNT
+# define _WIN32_WINNT 0x0501
/* mingw.org's MinGW headers mistakenly omit this enumeration: */
# ifndef MINGW_W64
typedef enum _WTS_VIRTUAL_CLASS {
@@ -33,6 +35,7 @@ typedef enum _WTS_VIRTUAL_CLASS {
} WTS_VIRTUAL_CLASS;
# endif
#include <wtsapi32.h> /* for WM_WTSSESSION_CHANGE, WTS_SESSION_LOCK */
+#endif /* WINDOWSNT */
#include "lisp.h"
#include "frame.h"
@@ -426,10 +429,12 @@ drain_message_queue (void)
{
switch (msg.message)
{
+#ifdef WINDOWSNT
case WM_WTSSESSION_CHANGE:
if (msg.wParam == WTS_SESSION_LOCK)
reset_w32_kbdhook_state ();
break;
+#endif
case WM_EMACS_FILENOTIFY:
retval = 1;
break;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 88355de6022: Unbreak the Cygw32 build broken by resent WTS_SESSION changes,
Eli Zaretskii <=