Skip to content

Commit

Permalink
DeskTop: Fix repaint of icons dragged on desktop
Browse files Browse the repository at this point in the history
Regressed in 1bdfff3. When optimizing repaints after dragging icons
within the some window (or desktop), it failed to specify that erasing
required clipping when for desktop icons moves.
  • Loading branch information
inexorabletash committed Jul 5, 2024
1 parent 6de6b0e commit 7be9589
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions res/notes/testplan.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
* Open a window. Position two icons so one overlaps another. Select only one icon. Drag it to a new location. Verify that the the both icons repaint correctly.

* Position a volume icon in the middle of the DeskTop. Incrementally move a window so that it obscures all 8 positions around it (top, top right, right, etc). Ensure the icon repaints fully, and no part of the window is over-drawn.
* Position a window partially overlapping desktop icons. Select overlapped desktop icons. Drag icons a few pixels to the right. Verify that window is not over-drawn.

* Launch DeskTop, File > Quit, run BASIC.SYSTEM. Ensure /RAM exists.

Expand Down
7 changes: 5 additions & 2 deletions toolkits/icontk.s
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,7 @@ includes_trash:

;; Drag within same window (or desktop)
same_window:
ldx #$80 ; clip (if desktop)
lda findwindow_params::which_area
.assert MGTK::Area::desktop = 0, error, "enum mismatch"
beq move_ok
Expand All @@ -888,10 +889,12 @@ same_window:

;; --------------------------------------------------

ldx #0 ; don't clip (not desktop; unnecessary)
move_ok:

stx ::drag_highlighted_lambda_clip_flag
INVOKE_WITH_LAMBDA IterateHighlightedIcons
ldx #0 ; don't clip
::drag_highlighted_lambda_clip_flag := *+1
ldx #SELF_MODIFIED_BYTE
clc ; don't redraw highlighted
jmp EraseIconCommon ; A = icon id, X = clip flag, C = redraw flag
END_OF_LAMBDA
Expand Down

0 comments on commit 7be9589

Please sign in to comment.