Re-enable the owner window in the EndDialog().
diff --git a/windows/dialog.c b/windows/dialog.c
index 2d5e7af..c5e4c79 100644
--- a/windows/dialog.c
+++ b/windows/dialog.c
@@ -1075,11 +1075,21 @@
/* Paint Shop Pro 4.14 calls EndDialog for a CreateDialog* dialog,
* which isn't "normal". Only DialogBox* dialogs may be EndDialog()ed.
- * Just hide the window as windows does it...
+ * Just hide the window
+ * and re-enable the owner as windows does it...
*/
ShowWindow(hwnd, SW_HIDE);
+ if(wndPtr->owner)
+ {
+ HWND hOwner;
+ /* Owner must be a top-level window */
+ hOwner = WIN_GetTopParent( wndPtr->owner->hwndSelf );
+ EnableWindow( hOwner, TRUE );
+ }
+
WIN_ReleaseWndPtr(wndPtr);
+
return TRUE;
}