- Fix log out shutdown dialog window input. See CORE-11633 #resolve
svn path=/trunk/; revision=71959
if (!(GetWindowLongPtrW( hwnd, GWL_STYLE ) & DS_NOIDLEMSG))
{
/* No message present -> send ENTERIDLE and wait */
if (!(GetWindowLongPtrW( hwnd, GWL_STYLE ) & DS_NOIDLEMSG))
{
/* No message present -> send ENTERIDLE and wait */
- if (owner) SendMessageW( owner, WM_ENTERIDLE, MSGF_DIALOGBOX, (LPARAM)hwnd );
+ SendMessageW( owner, WM_ENTERIDLE, MSGF_DIALOGBOX, (LPARAM)hwnd );
}
GetMessageW( &msg, 0, 0, 0 );
}
}
GetMessageW( &msg, 0, 0, 0 );
}
if (modal_owner && owner)
{
if (modal_owner && owner)
{
/*
* Owner needs to be top level window. We need to duplicate the logic from server,
* because we need to disable it before creating dialog window. Note that we do that
* even if dialog has WS_CHILD, but only for modal dialogs, which matched what
* Windows does.
*/
/*
* Owner needs to be top level window. We need to duplicate the logic from server,
* because we need to disable it before creating dialog window. Note that we do that
* even if dialog has WS_CHILD, but only for modal dialogs, which matched what
* Windows does.
*/
- while ((GetWindowLongW( owner, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) == WS_CHILD)
+
+ ////// Wine'ie babies need to fix your code!!!! CORE-11633
+ if ((GetWindowLongW( owner, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) == WS_CHILD)
- parent = GetParent( owner );
- if (!parent || parent == GetDesktopWindow()) break;
- owner = parent;
+ parent = owner;
+ while ((GetWindowLongW( parent, GWL_STYLE ) & (WS_POPUP|WS_CHILD)) == WS_CHILD)
+ {
+ parent = GetParent( owner );
+ if (!parent || parent == GetDesktopWindow())
+ {
+ parent = NULL;
+ break;
+ }
+ }
- *modal_owner = owner;
- if (IsWindowEnabled( owner ))
+ else
+ parent = GetAncestor( owner, GA_ROOT );
+
+ if (parent)
- disabled_owner = owner;
- EnableWindow( disabled_owner, FALSE );
+ owner = parent;
+
+ if (IsWindowEnabled( owner ))
+ {
+ disabled_owner = owner;
+ EnableWindow( disabled_owner, FALSE );
+ }
- //if (modal && ownerEnabled) DIALOG_EnableOwner(owner);
if (disabled_owner) EnableWindow( disabled_owner, TRUE );
IntNotifyWinEvent(EVENT_SYSTEM_DIALOGEND, hwnd, OBJID_WINDOW, CHILDID_SELF, 0);
if( IsWindow(hwnd) )
if (disabled_owner) EnableWindow( disabled_owner, TRUE );
IntNotifyWinEvent(EVENT_SYSTEM_DIALOGEND, hwnd, OBJID_WINDOW, CHILDID_SELF, 0);
if( IsWindow(hwnd) )
}
else
owner = GetWindow( hwnd, GW_OWNER );
}
else
owner = GetWindow( hwnd, GW_OWNER );
if (owner)
EnableWindow( owner, TRUE );
if (owner)
EnableWindow( owner, TRUE );