summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qd/Qdmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'Mac/Modules/qd/Qdmodule.c')
-rw-r--r--Mac/Modules/qd/Qdmodule.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Mac/Modules/qd/Qdmodule.c b/Mac/Modules/qd/Qdmodule.c
index 34476d4..aece598 100644
--- a/Mac/Modules/qd/Qdmodule.c
+++ b/Mac/Modules/qd/Qdmodule.c
@@ -144,8 +144,14 @@ GrafObj_Convert(v, p_itself)
PyObject *v;
GrafPtr *p_itself;
{
- if (DlgObj_Check(v) || WinObj_Check(v)) {
- *p_itself = ((GrafPortObject *)v)->ob_itself;
+ if (DlgObj_Check(v)) {
+ DialogRef dlg = (DialogRef)((GrafPortObject *)v)->ob_itself;
+ *p_itself = (GrafPtr)GetWindowPort(GetDialogWindow(dlg));
+ return 1;
+ }
+ if (WinObj_Check(v)) {
+ WindowRef win = (WindowRef)((GrafPortObject *)v)->ob_itself;
+ *p_itself = (GrafPtr)GetWindowPort(win);
return 1;
}
if (!GrafObj_Check(v))