Commit e25bd2b7 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Fix bug in Wimp_WhichIcon

When matching an icon on the iconbar the window is initially matched correctly, but the "is this the right task" filter step was trying to compare the handle with -1. The result was that you would get the first match for any iconbar icon rather than a match for *your* iconbar icon.
Unrelated: Tiling.s/Iconbar.s add a couple of comments and use symbols instead of magic numbers.
Tested with a quality 3 line BASIC program, no longer returns icon #0 all the time.

Version 5.23. Tagged as 'Wimp-5_23'
parent fc22d68f
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.22"
Module_Version SETA 522
Module_MajorVersion SETS "5.23"
Module_Version SETA 523
Module_MinorVersion SETS ""
Module_Date SETS "10 Apr 2013"
Module_ApplicationDate SETS "10-Apr-13"
Module_Date SETS "13 Apr 2013"
Module_ApplicationDate SETS "13-Apr-13"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "castle/RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "5.22"
Module_HelpVersion SETS "5.22 (10 Apr 2013)"
Module_FullVersion SETS "5.23"
Module_HelpVersion SETS "5.23 (13 Apr 2013)"
END
/* (5.22)
/* (5.23)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.22
#define Module_MajorVersion_CMHG 5.23
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 10 Apr 2013
#define Module_Date_CMHG 13 Apr 2013
#define Module_MajorVersion "5.22"
#define Module_Version 522
#define Module_MajorVersion "5.23"
#define Module_Version 523
#define Module_MinorVersion ""
#define Module_Date "10 Apr 2013"
#define Module_Date "13 Apr 2013"
#define Module_ApplicationDate "10-Apr-13"
#define Module_ApplicationDate "13-Apr-13"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "castle/RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "5.22"
#define Module_HelpVersion "5.22 (10 Apr 2013)"
#define Module_LibraryVersionInfo "5:22"
#define Module_FullVersion "5.23"
#define Module_HelpVersion "5.23 (13 Apr 2013)"
#define Module_LibraryVersionInfo "5:23"
......@@ -155,7 +155,7 @@ addtoR1
; if indirected can be turned off with validation X
Push R3
LDR R3,[R1,#4]
MOV R2,#"X"
MOV R2,#WimpValidation_NoAuto
BL findcommand
Pull R3
BEQ %FT9 ; found X
......@@ -644,7 +644,7 @@ resizeicons_loop
BLHI mapslotinout
; so that indirected data is ok. Now R1-> text
Push "R2,R3"
MOV R2,#"X"
MOV R2,#WimpValidation_NoAuto
LDR R3,[R5,#i_data+4] ; validation string
BL findcommand
Pull "R2,R3"
......
......@@ -56,8 +56,8 @@ plotspritebackground
LDR R1,[handle,#w_areaCBptr]
CMP R1,#2
BLO %FT3
MOV R0,#24
BLO %FT3 ; 0 ==> system, 1 ==> wimp, else user
MOV R0,#SpriteReason_SelectSprite
ORR R0,R0,#256
ADR R2,plotsprite_tile1
SWI XOS_SpriteOp
......@@ -101,9 +101,9 @@ plotspritebackground
B %FT6
3
LDR R2,tiling_sprite
CMP R2,#0
CMP R2,#0 ; disabled/not there
BEQ %FT4
CMP R2,#-1
CMP R2,#-1 ; needs recache
LDRNE R1,baseofsprites
BNE %FT5
BLEQ findwimptilesprite
......
......@@ -5178,7 +5178,7 @@ int_which_icon
whiclp
CMP R4,R6
BHS endwhlp
CMP R0,#nullptr ; if iconbar,
CMP R0,#nullptr2 ; if iconbar,
BNE %FT01 ; check that the task owns this icon
Push "R1,R2,R7"
BL findicon ; R2 -> iconblock
......
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