diff --git a/s/CBTask b/s/CBTask index 2790d0f11152e34764ac37024b5599bbc663698a..000046dc962b66c2741a856c7a75be03872d6ade 100644 --- a/s/CBTask +++ b/s/CBTask @@ -251,6 +251,10 @@ cbtask_claimentity_rx LDR R2,[R2] TEQ R0,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