2022-04-14 15:47:44 -07:00
|
|
|
From 44c4620a48a2d15269a083d9c04bcf9e4ee77e58 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-14 15:47:44 -07:00
|
|
|
index eb2f0c6626c..2f0606d1adc 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 )
|
2013-11-21 12:33:37 -08:00
|
|
|
if (hwndFocus && IsChild( 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-14 15:47:44 -07:00
|
|
|
2.35.1
|
2013-11-21 12:33:37 -08:00
|
|
|
|