From 462d3e191433e35b6b8a469432483492f332f819 Mon Sep 17 00:00:00 2001 From: Joshua Bell Date: Wed, 24 Apr 2019 23:45:18 -0700 Subject: [PATCH] DeskTop: Don't redraw hilited icons when obscured. Fixes #151 --- MGTK.md | 4 ++-- desktop/desktop_main.s | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/MGTK.md b/MGTK.md index f8415be..f98e892 100644 --- a/MGTK.md +++ b/MGTK.md @@ -740,7 +740,7 @@ Parameters: .addr port address of GrafPort to populate ``` -Returns `error_window_obscured` if the content area of the window is completely offscreen and drawing should be skipped. (The port rect will be invalid.) +Returns `Error::window_obscured` if the content area of the window is completely offscreen and drawing should be skipped. (The port rect will be invalid.) #### SetWinPort ($3D) @@ -974,7 +974,7 @@ _Notes specific to DeskTop Desk Accessories (DA) are included where usage differ #### Redraw window * `GetWinPort` - populate a local GrafPort with an appropriately clipped port -* if `error_window_obscured` is returned, abort these steps (port will be invalid) +* if `Error::window_obscured` is returned, abort these steps (port will be invalid) * `SetPort` - make it current * optional: `HideCursor` - if multiple drawing calls will be made * ... draw ... diff --git a/desktop/desktop_main.s b/desktop/desktop_main.s index 2b38195..4485135 100644 --- a/desktop/desktop_main.s +++ b/desktop/desktop_main.s @@ -297,6 +297,8 @@ bail: rts copy active_window_id, getwinport_params2::window_id jsr get_port2 + cmp #MGTK::Error::window_obscured + beq done jsr offset_grafport2_and_set COPY_BLOCK grafport2::cliprect, tmp_rect