Commit d2f6d63a authored by Ben Avison's avatar Ben Avison
Browse files

A few bugfixes, and some muching around with WimpVisualFlags that I did ages...

A few bugfixes, and some muching around with WimpVisualFlags that I did ages ago but hasn't made it into a build yet.

Detail:
  * Deleting icon 0 in a window that had no windows would rotate the
    contents of word &00000010 by 16 bits. This had the effect of causing
    lazy task swapping to blow up with an "undefined instruction" error.
  * Setting the caret to a byte position beyond the end of an icon's text
    would (a) loop indefinitely if the alphabet is UTF-8, or (b) data abort
    for any other alphabet. This was due to the code trying to determine the
    number of characters in the string, and ignoring the terminator;
    skipcharR would never advance far enough to satisfy the loop in UTF-8,
    in other alphabets it would advance as far as necessary, leading to the
    later code to try to step a huge number of characters through the
    pushfontstring copy of the text, running off the top of the SVC stack
    (which is mapped out on Tungsten, previously it abutted the system heap,
    so no ill effects were observed).
  * Keyboard shortcuts are now correctly positoned when 3D menus are selected.
  * Corrected spelling of "dialogue" in *WimpVisualFlags help.
  * Changed *WimpVisualFlags so that no parameters gives RISC OS 3
    behaviour, and -All gives default RISC OS 4 behaviour. (Previously, font
    blending was enabled in both cases, unless explicitly disabled by an
    additional -NoFontBlending switch.) This required a sense change in the
    font blending switch: -FontBlending now enables font blending.
    -NoFontBlending is still accepted without error, but is ineffectual
    (since the no-options state upon which it acts already has font blending
    disabled).
  * Default setting is now as though *WimpVisualFlags -RemoveIconBoxes had
    been executed. (In practice, this will not be noticeably different from
    previous Tematic versions, see below.)
  * The state -RemoveIconBoxes switch was previously assumed always set -
    now, if it is not specified, you get the old RISC OS 3 behaviour back.
Admin:
  Tested on Tungsten.

Version 4.82. Tagged as 'Wimp-4_82'
parent 8207a1fd
No preview for this file type
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "4.81"
Module_Version SETA 481
Module_MajorVersion SETS "4.82"
Module_Version SETA 482
Module_MinorVersion SETS ""
Module_Date SETS "28 Nov 2002"
Module_ApplicationDate SETS "28-Nov-02"
Module_Date SETS "05 Dec 2002"
Module_ApplicationDate SETS "05-Dec-02"
Module_ComponentName SETS "Wimp"
Module_ComponentPath SETS "RiscOS/Sources/Desktop/Wimp"
Module_FullVersion SETS "4.81"
Module_HelpVersion SETS "4.81 (28 Nov 2002)"
Module_FullVersion SETS "4.82"
Module_HelpVersion SETS "4.82 (05 Dec 2002)"
END
/* (4.81)
/* (4.82)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.68.
*
*/
#define Module_MajorVersion_CMHG 4.81
#define Module_MajorVersion_CMHG 4.82
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 28 Nov 2002
#define Module_Date_CMHG 05 Dec 2002
#define Module_MajorVersion "4.81"
#define Module_Version 481
#define Module_MajorVersion "4.82"
#define Module_Version 482
#define Module_MinorVersion ""
#define Module_Date "28 Nov 2002"
#define Module_Date "05 Dec 2002"
#define Module_ApplicationDate "28-Nov-02"
#define Module_ApplicationDate "05-Dec-02"
#define Module_ComponentName "Wimp"
#define Module_ComponentPath "RiscOS/Sources/Desktop/Wimp"
#define Module_FullVersion "4.81"
#define Module_HelpVersion "4.81 (28 Nov 2002)"
#define Module_LibraryVersionInfo "4:81"
#define Module_FullVersion "4.82"
#define Module_HelpVersion "4.82 (05 Dec 2002)"
#define Module_LibraryVersionInfo "4:82"
......@@ -366,7 +366,9 @@ TileInfo * @
ThreeDFlags_Default * &FFFFFFFF :AND::NOT: (ThreeDFlags_NoFontBlending :OR: ThreeDFlags_FullIconClipping)
|
; you have to be kidding - use sane defaults
ThreeDFlags_Default * ThreeDFlags_NoFontBlending
ThreeDFlags_Default * ThreeDFlags_RemoveIconBackgrounds :OR: \
ThreeDFlags_NoFontBlending
ThreeDFlags_All * :NOT: ThreeDFlags_NoFontBlending
]
ThreeDFlags_Use3DBorders * 1<<0 ; set to indicate the user wants 3D borders if they are configured
ThreeDFlags_UseAlternateMenuTexture * 1<<1
......@@ -375,7 +377,7 @@ ThreeDFlags_RemoveIconBackgrounds * 1<<3
ThreeDFlags_TexturedMenus * 1<<4
ThreeDFlags_NoIconBgInTransWindows * 1<<5
ThreeDFlags_NoFontBlending * 1<<6
ThreeDFlags_FullIconClipping * 1<<7
ThreeDFlags_FullIconClipping * 1<<7 ; we're just ignoring this flag
arrowIconWidth_No3D * 24
arrowIconWidth_3D * 32
......@@ -2122,29 +2124,29 @@ WimpClickSubmenuC_Syntax DCB "Syntax: *Configure WimpClickSubmenu On|Off"
[ ThreeDPatch
WimpVisualFlags_Help DCB "Change the visual appearance of the desktop.",cr
DCB "-3DWindowBorders",cr
DCB " Give all menus and dialog boxes a 3D border.",cr
DCB " Give all menus and dialogue boxes a 3D border.",cr
DCB "-TexturedMenus",cr
DCB " Give all menus a textured background.",cr
DCB " Give all menus a textured background.",cr
DCB "-UseAlternateMenuBg",cr
DCB " Use a different background tile for menus.",cr
DCB " Use a different background tile for menus.",cr
DCB "-RemoveIconBoxes",cr
DCB " Remove the filled box from behind the text in text+sprite icons.",cr
DCB " Remove the filled box from behind the text in text+sprite icons.",cr
DCB "-NoIconBoxesInTransWindows",cr
DCB " Remove the filled box from icons on windows similar to the pinboard.",cr
DCB " Remove the filled box from icons on windows similar to the pinboard.",cr
DCB "-Fully3DIconBar",cr
DCB " Make the iconbar have a full 3D border.",cr
DCB "-NoFontBlending",cr
DCB " Don't use font blending in icons.
DCB " Make the iconbar have a full 3D border.",cr
DCB "-FontBlending",cr
DCB " Use font blending in icons.",cr
DCB "-All",cr
DCB " Turn all flags on.",cr
DCB " Turn all flags on.",cr
DCB "-WindowBorderFaceColour <&RRGGBB>",cr
DCB " Set the colour of the top left portion of the window border.",cr
DCB " Set the colour of the top left portion of the window border.",cr
DCB "-WindowBorderOppColour <&RRGGBB>",cr
DCB " Set the colour of the bottom right portion of the window border.",cr
DCB "-MenuBorderFaceColour <&RRGGBB>",cr
DCB " Set the colour of the top left portion of the menu border.",cr
DCB " Set the colour of the top left portion of the menu border.",cr
DCB "-MenuBorderOppColour <&RRGGBB>",cr
DCB " Set the colour of the bottom right portion of the menu border.",0
DCB " Set the colour of the bottom right portion of the menu border.",0
WimpVisualFlags_Syntax DCB "Syntax: *WimpVisualFlags <options>",0
]
ALIGN
......@@ -6944,7 +6946,7 @@ WimpKillSprite_Code
DCB "NoIconBoxesInTransWindows=NIBITW/S,Fully3DIconBar=F3DIB/S,All=A/S,"
DCB "WindowBorderFaceColour=WBFC/E,WindowBorderOppColour=WBOC/E,"
DCB "MenuBorderFaceColour=MBFC/E,MenuBorderOppColour=MBOC/E,"
DCB "NoFontBlending=NFB/S",0
DCB "NoFontBlending=NFB/S,FontBlending=FB/S",0
ALIGN
WimpVisualFlags_Code
......@@ -6952,7 +6954,7 @@ WimpVisualFlags_Code
LDR r12,[r12]
TEQ r1,#0
MOVEQ r1,#ThreeDFlags_NoFontBlending
MOVEQ r1,# :NOT: ThreeDFlags_All
STREQ r1,ThreeDFlags ; if no options are supplied then turn everything off
MOVEQ lr,#arrowIconWidth_No3D
STREQB lr,arrowIconWidth
......@@ -6967,7 +6969,7 @@ WimpVisualFlags_Code
ADDVS sp,sp,#256
Pull "r12,pc",VS
MOV r2,#0
MOV r2,# :NOT: ThreeDFlags_All
LDR r1,[sp,#0]
TEQ r1,#0
ORRNE r2,r2,#ThreeDFlags_Use3DBorders
......@@ -6989,12 +6991,12 @@ WimpVisualFlags_Code
LDR r1,[sp,#20]
TEQ r1,#0
ORRNE r2,r2,#ThreeDFlags_Fully3DIconBar
LDR r1,[sp,#44]
TEQ r1,#0
ORRNE r2,r2,#ThreeDFlags_NoFontBlending
; LDR r1,[sp,#44]
; TEQ r1,#0
; ORRNE r2,r2,#ThreeDFlags_NoFontBlending ; bit is already set!
LDR r1,[sp,#48]
TEQ r1,#0
ORRNE r2,r2,#ThreeDFlags_FullIconClipping
BICNE r2,r2,#ThreeDFlags_NoFontBlending
LDR r1,[sp,#28] ; window border face colour
BL %FT02
......@@ -7018,7 +7020,7 @@ WimpVisualFlags_Code
LDR r1,[sp,#24] ; all
TEQ r1,#0
MOVNE r2,#&FFFFFFFF :EOR: ThreeDFlags_NoFontBlending
MOVNE r2,#ThreeDFlags_All
MOVNE lr,#arrowIconWidth_3D
STRNEB lr,arrowIconWidth
......
......@@ -4385,8 +4385,8 @@ int_deleteicon
LDR R3,[handle,#w_nicons]
LDR R0,[handle,#w_icons]
ADD R0,R0,R2,ASL #i_shift
SUB R14,R3,#1 ; compare with no. of icons-1
CMP R2,R14
ADD R14,R2,#1 ; compare number of icons up to and including this handle
CMP R14,R3 ; with number of icons
Pull "R1-R3,R6,PC",HI ; deleted (doesn't exist)
LDRLO R14,[R0,#i_flags]
ORRLO R14,R14,#is_deleted
......
......@@ -1840,6 +1840,7 @@ icontext TraceL font
LDR r14,ThreeDFlags
TST r14,#ThreeDFlags_RemoveIconBackgrounds
BEQ %FT92
MOV r0,r1,LSR #ib_bcol
LDR handle,redrawhandle
......
......@@ -1144,6 +1144,9 @@ setcaretcoords_fancy TraceL sc
BGT %FT02 ; past the caret point? don't count the partial character (matches font mgr)
ADD R3, R3, #1
BEQ %FT02 ; at the caret point?
LDRB R14, [R2] ; reached terminator before byte count?
CMP R14, #' ' ; yes, don't increment R3 any more (avoids infinite loop here in UTF8 case
BLO %FT02 ; and running off the top of the SVC stack below in non-UTF8 case)
BL skipcharR
B %BT01
02 ; Now have R3 = printable character count, find that byte index into pushed string
......@@ -5660,7 +5663,13 @@ fixupfontstring_end
LDR R1, redrawhandle
BIC R1, R1, #3
LDR R1, [R1, #w_x1]
[ ThreeDPatch
LDR R14, arrowIconWidth
SUB R1, R1, #16 - 6 ; portion of excess text icon width on right
SUB R1, R1, R14
|
SUB R1, R1, #24 + (16 - 6) ;width of arrow + portion of excess text icon width on right
]
TraceK menuw, "fixupfontstring: moving to ("
TraceD menuw, R1
TraceK menuw, ", "
......
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