2022-04-15 17:28:24 -07:00
|
|
|
From e1440086421942267ff1df00fdb11e724bd0119b Mon Sep 17 00:00:00 2001
|
2013-11-21 12:33:37 -08:00
|
|
|
From: Sebastian Lackner <sebastian@fds-team.de>
|
2013-11-22 10:54:41 -08:00
|
|
|
Date: Fri, 22 Nov 2013 18:54:18 +0100
|
2022-04-14 15:47:44 -07:00
|
|
|
Subject: [PATCH] winex11: Enable/disable windows when they are (un)mapped by
|
|
|
|
foreign applications
|
2013-11-21 12:33:37 -08:00
|
|
|
|
|
|
|
---
|
2016-08-25 14:43:12 -07:00
|
|
|
dlls/winex11.drv/event.c | 17 +++++++++++++++++
|
2013-11-21 12:33:37 -08:00
|
|
|
1 file changed, 17 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/dlls/winex11.drv/event.c b/dlls/winex11.drv/event.c
|
2022-04-15 17:28:24 -07:00
|
|
|
index 147865e7af6..92504a248ca 100644
|
2013-11-21 12:33:37 -08:00
|
|
|
--- a/dlls/winex11.drv/event.c
|
|
|
|
+++ b/dlls/winex11.drv/event.c
|
2022-04-14 15:47:44 -07:00
|
|
|
@@ -981,6 +981,7 @@ static BOOL X11DRV_Expose( HWND hwnd, XEvent *xev )
|
2016-08-25 14:43:12 -07:00
|
|
|
static BOOL X11DRV_MapNotify( HWND hwnd, XEvent *event )
|
2013-11-21 12:33:37 -08:00
|
|
|
{
|
|
|
|
struct x11drv_win_data *data;
|
|
|
|
+ BOOL is_embedded;
|
|
|
|
|
2019-09-06 15:38:54 -07:00
|
|
|
if (event->xany.window == x11drv_thread_data()->clip_window) return TRUE;
|
|
|
|
|
2022-04-14 15:47:44 -07:00
|
|
|
@@ -992,7 +993,12 @@ static BOOL X11DRV_MapNotify( HWND hwnd, XEvent *event )
|
2022-04-15 17:28:24 -07:00
|
|
|
if (hwndFocus && NtUserIsChild( hwnd, hwndFocus ))
|
2013-11-22 10:54:41 -08:00
|
|
|
set_input_focus( data );
|
2013-11-21 12:33:37 -08:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ is_embedded = data->embedded;
|
|
|
|
release_win_data( data );
|
|
|
|
+
|
|
|
|
+ if (is_embedded)
|
2022-04-14 15:47:44 -07:00
|
|
|
+ NtUserEnableWindow( hwnd, TRUE );
|
2016-08-25 14:43:12 -07:00
|
|
|
return TRUE;
|
2013-11-21 12:33:37 -08:00
|
|
|
}
|
|
|
|
|
2022-04-14 15:47:44 -07:00
|
|
|
@@ -1002,6 +1008,17 @@ static BOOL X11DRV_MapNotify( HWND hwnd, XEvent *event )
|
2013-11-21 12:33:37 -08:00
|
|
|
*/
|
2016-08-25 14:43:12 -07:00
|
|
|
static BOOL X11DRV_UnmapNotify( HWND hwnd, XEvent *event )
|
2013-11-21 12:33:37 -08:00
|
|
|
{
|
|
|
|
+ struct x11drv_win_data *data;
|
|
|
|
+ BOOL is_embedded;
|
|
|
|
+
|
2016-08-25 14:43:12 -07:00
|
|
|
+ if (!(data = get_win_data( hwnd ))) return FALSE;
|
2013-11-21 12:33:37 -08:00
|
|
|
+
|
|
|
|
+ is_embedded = data->embedded;
|
|
|
|
+ release_win_data( data );
|
2013-11-22 10:54:41 -08:00
|
|
|
+
|
2013-11-21 12:33:37 -08:00
|
|
|
+ if (is_embedded)
|
2022-04-14 15:47:44 -07:00
|
|
|
+ NtUserEnableWindow( hwnd, FALSE );
|
2019-09-06 15:38:54 -07:00
|
|
|
+
|
2016-08-25 14:43:12 -07:00
|
|
|
return TRUE;
|
2013-11-21 12:33:37 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
--
|
2022-04-15 17:28:24 -07:00
|
|
|
2.34.1
|
2013-11-21 12:33:37 -08:00
|
|
|
|