Commit 14056f15 authored by ROOL's avatar ROOL 🤖
Browse files

Fix for abort on pasting into writeable menus

  Menu windows don't store the task handle in their datablock, so an incorrect one was used as part of the data transfer sequence.
  Also, minor fix for Message_ClaimEntity when bit 2 was clear (bits 0,1 set). The response meant that, for example, Alt-click to rename, select text in writeable and press ^C - copied to clipboard, but writeable is removed.
  Submission for Clipboard Support bounty.
parent 11d21750
......@@ -251,6 +251,10 @@ cbtask_claimentity_rx
LDR R2,[R2]
BEQ cbtask_poll ; it was us, so ignore
; was it a clipboard claim?
LDR R0,[R1,#msClaimEntity_flags]
TST R0,#4
BEQ cbtask_poll
; release our claim
MOV R0,#clipboard_flexblock_clipdata
MOV R1,#0
......@@ -866,6 +870,8 @@ cbtask_get_icon_text
ADRL R2,clipboard_taskhandle
LDR R2,[R2] ; destination task (us)
LDR R0,[R10,#w_taskhandle]
CMP R0,#-1 ; menu windows don't have a task handle attached
LDREQ R0,menutaskhandle ; so we get the menu owner's handle to use instead
LDR R14,[wsptr,R0]
LDR R14,[R14,#task_flagword]
MOV R14,R14,LSR #flag_versionbit
......@@ -897,6 +903,8 @@ cbtask_put_icon_text
LDR R0,[R0]
LDR R2,[R10,#w_taskhandle]
CMP R2,#-1 ; menu windows don't have an attached taskhandle
LDREQ R2,menutaskhandle ; so look at the menu's owner instead
LDR R14,[wsptr,R2]
LDR R14,[R14,#task_flagword]
MOV R14,R14,LSR #flag_versionbit
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment