Commit a0d03ef1 authored by Noel Borthwick's avatar Noel Borthwick Committed by Alexandre Julliard

While handling the WM_DELETEWINDOW client message check if a window

has been disabled and if so prevent an SC_CLOSE message from being sent.
parent b0ebeeb0
......@@ -1457,7 +1457,17 @@ static void EVENT_ClientMessage( HWND hWnd, XClientMessageEvent *event )
if (event->message_type != None && event->format == 32) {
if ((event->message_type == wmProtocols) &&
(((Atom) event->data.l[0]) == wmDeleteWindow))
{
/* Ignore the delete window request if the window has been disabled
* and we are in managed mode. This is to disallow applications from
* being closed by the window manager while in a modal state.
*/
BOOL bIsDisabled;
bIsDisabled = GetWindowLongA( hWnd, GWL_STYLE ) & WS_DISABLED;
if ( !Options.managed || !bIsDisabled )
SendMessage16( hWnd, WM_SYSCOMMAND, SC_CLOSE, 0 );
}
else if ( event->message_type == dndProtocol &&
(event->data.l[0] == DndFile || event->data.l[0] == DndFiles) )
EVENT_DropFromOffiX(hWnd, event);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment