Commit 45a23f3f authored by Ben Avison's avatar Ben Avison
Browse files

A number of bugfixes.

Detail:
  * The character codes returned from the Key_Pressed event were incorrect
    when the caret was in a writeable icon with Kd in the validation string,
    and either (a) the caret was not at the start and Delete or Backspace were
    pressed, or (b) the caret was not at the end and Copy was pressed. (This
    was because, in these cases, the writeable icon code exited through
    passbacktouser rather than exitprocess; the former expects the keycode to
    be preserved, but the UTF-8 extensions to key handling were corrupting it.)
    Shift-Copy, Ctrl-Copy and Ctrl-U were not affected.
  * The various checkhandle routines now preserve flags again, as they did
    before 32-bit support was added. This is crucial in a number of spots,
    because the flags are based upon a test of handle, and checkhandle
    corrupts the handle register. This fixes at least two bugs: you can now
    send messages to menus or dialogue boxes again, and Wimp_RedrawWindow
    called without a Redraw_Window_Request is back (so for example, the
    Desktop Welcome screen now works again).
  * Fixed a bit of errant 26-bitism in the multiple-window iconise code.
Admin:
  Tested briefly on an Ursula build.

Version 4.52. Tagged as 'Wimp-4_52'
parent 2fe401b8
......@@ -6,9 +6,13 @@
GBLS Module_MinorVersion
GBLS Module_Date
GBLS Module_FullVersion
Module_MajorVersion SETS "4.51"
Module_Version SETA 451
GBLS Module_ApplicationDate2
GBLS Module_ApplicationDate4
Module_MajorVersion SETS "4.52"
Module_Version SETA 452
Module_MinorVersion SETS ""
Module_Date SETS "06 Jun 2000"
Module_FullVersion SETS "4.51"
Module_Date SETS "15 Jun 2000"
Module_ApplicationDate2 SETS "15-Jun-00"
Module_ApplicationDate4 SETS "15-Jun-2000"
Module_FullVersion SETS "4.52"
END
/* (4.51)
/* (4.52)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 4.51
#define Module_MajorVersion_CMHG 4.52
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Jun 2000
#define Module_Date_CMHG 15 Jun 2000
#define Module_MajorVersion "4.51"
#define Module_Version 451
#define Module_MajorVersion "4.52"
#define Module_Version 452
#define Module_MinorVersion ""
#define Module_Date "06 Jun 2000"
#define Module_Date "15 Jun 2000"
#define Module_FullVersion "4.51"
#define Module_ApplicationDate2 "15-Jun-00"
#define Module_ApplicationDate4 "15-Jun-2000"
#define Module_FullVersion "4.52"
......@@ -3521,8 +3521,8 @@ iconisenextwindow
Entry "R0-R4,handle"
LDR handle, nextwindowtoiconise
BL checkhandle ; make sure it's still valid
MOV R0, PC
TST R0, #V_bit
TEQVS PC, #0 ; \ set Z = not (V)
TEQVC R0, R0 ; /
LDREQ R14, [handle, #w_flags]
ANDEQ R0, R14, #ws_open
CMPEQ R0, #ws_open ; and open
......
......@@ -5506,15 +5506,15 @@ ptr_on DCB "Pointer", 0
;
checkhandle_owner ROUT
Push "R1,LR"
EntryS "R1"
BL checkhandle
Pull "R1,PC",VS
EXIT VS
LDR R14,[handle,#w_taskhandle]
LDR R1,polltaskhandle ; NB no-one owns the 'system' windows
CMP R1,R14 ; so this check always fails!
Pull "R1,PC",EQ
EXITS EQ
MyXError WimpOwnerWindow ; "access to window denied"
Pull "R1,PC"
EXIT
MakeErrorBlock WimpOwnerWindow
checkhandle_iconbar
......@@ -5522,7 +5522,7 @@ checkhandle_iconbar
LDREQ handle,iconbarhandle ; drop through
checkhandle
Push "R0,R1,LR"
EntryS "R0,R1"
;
; Check the window structure for being inside valid memory
;
......@@ -5542,7 +5542,7 @@ checkhandle
;
; It's clean
;
Pull "R0,R1,PC",EQ
EXITS EQ
errhandle
Debug err,"**** Task, bad window handle",#taskhandle,handle
......@@ -5550,7 +5550,7 @@ errhandle
; It's dirty
MyXError WimpBadHandle
STR R0,[sp]
Pull "R0,R1,PC"
EXIT
MakeErrorBlock WimpBadHandle
LTORG
......
......@@ -2403,9 +2403,11 @@ isdelete
]
int_isdelete
[ UTF8
MOVS R6, R5
CMP R5, #0
BLE exitprocess ; if already at start, do nothing
Push "R6"
MOV R6, R5
ADD R2, R2, R5
MOV R7, R2 ; remember original pointer
BL skipcharL
......@@ -2416,7 +2418,7 @@ dellp LDRB R0, [R2, -R7] ; copy down
CMP R0, #' '
BGE dellp
Push "R0-R6"
Push "R0-R5"
MOV R6, R7 ; move caret back by appropriate number of bytes
|
SUBS R5,R5,#1
......@@ -2459,9 +2461,11 @@ iscopy
]
int_iscopy
[ UTF8
Push "R6"
SUB R6, R4, R2 ; index just past terminator
SUB R6, R6, #1 ; length of the string
SUBS R6, R6, R5 ; distance to end of string - if any
Pull "R6", LE
BLE exitprocess ; do nothing if we're at the end already
ADD R2, R2, R5
......@@ -2473,6 +2477,8 @@ dellp2 LDRB R0, [R7, R2] ; copy down
STRB R0, [R7], #1
CMP R0, #' '
BGE dellp2
Push "R0-R5"
|
LDRB R0,[R2,R5]!
CMP R0,#32
......@@ -2481,9 +2487,9 @@ dellp2 LDRB R0,[R2,#1] ; copy down
STRB R0,[R2],#1
CMP R2,R4
BCC dellp2
]
Push "R0-R6"
]
MOV R6,#0 ; no movement
BL int_donechar
LDMIA SP,{R0-R6}
......
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