[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[StrongED] A couple of bug fixes
- To: StrongED@xxxxxxxxxxxxxx
- Subject: [StrongED] A couple of bug fixes
- From: Jeffrey Lee <me@xxxxxxxxxxxxxxxxxxx>
- Date: Sun, 1 Jul 2018 16:48:30 +0100 (GMT Summer Time)
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:subject:message-id:user-agent:mime-version; bh=bQ22z+YQGPgtXWXG4ZXCDrtmB2x+8DaBo44sqLsMSLs=; b=FXqxLqIzckckCWXoY79f3mCtgTbNSnHlP7hr+ZTo+Lfwx8aVDwGXkDQwaokvM5BKuy Di9gZr6btmuDZiwOujg7jn+WTCPQ6lEoG0saDGv1AFtBzf10QjmP5rowMzzAMaRIGeMi rGsWp3r++p5IPpa30Y+lmMf1KGMoJI3aX1ORa0leNUeVLPxTXuKtxRW7tlt7s9WCLOx4 2ixbrI2CclRAxQqfoEtA41uiOfaMx239wo5Z+8oaldnYIrSdSjeap8Y2RFoCxOpecdUG xxVGIEvwbgjn9Q/23ckQ2YQXA3ZrsK5ZRyh6Yq1KN+gwMsJ3tBQV135YHAKJbgCriwaV C72w==
- Envelope-to: StrongED@xxxxxxxxxxxxxx
- List-id: RISC OS StrongED mailing list
- Reply-to: StrongED@xxxxxxxxxxx
- Sender: Jeffrey Lee <phlamethrower@xxxxxxxxx>
- User-agent: Alpine 2.00 (WNT 1167 2008-08-23)
Hi,
I had a report of some odd interaction between vncserver and StrongED,
relating to the global clipboard handling. After some investigation it
turns out this was half vncserver's fault (dodgy RAM transfer protocol
implementation) and half StrongED. I've attached a patch containing my
fixes for StrongED (based around the 469f10 sources); if you could give
them a sanity check and include them in the next release then that would
be great.
The changes were:
* Fixing CloseMenu to only call Wimp_CreateMenu if it actually wants to
close the menu (R1=-1). StrongED was getting confused and trying to close
menus when it shouldn't; if it was another app which had a menu open then
calling with R1=0 actually had the effect of closing that app's menu.
* Make CloseSaveBox really do nothing if no one_window is open (to match
the logic below which checks the window type)
* PushSaveRec and PullSaveRec were sometimes exiting via CSB1, causing
CloseMenu to be invoked. Fix them to exit properly.
These all fix problems relating to menus closing when the VNC server (or
other apps) make clipboard requests. The VNC server has to regularly poll
to see if the clipboard contents has changed; if StrongED owned the
clipboard then these bugs meant that menus would close almost as soon as
you opened them. You can grab a copy of the VNC server from
http://www.phlamethrower.co.uk/riscos/vnc_serv.php if you want to see the
bugs in action. I think all you need to do is open a VNC connection to the
RISC OS machine, add some text to the global clipboard via StrongED, and
then try opening some menus.
I originally tried submitting these patches to
developer@xxxxxxxxxxxxxxxxxxxx several months ago, but I guess that
address must be dead or misconfigured since I never got a reply back.
Cheers,
- Jeffrey
diff -U 5 -r ADFS::HardDisc4.$.Public.stronged.se469f9s.!SrcStrED.sTxt.Menu ADFS::HardDisc4.$.Public.stronged.src.!SrcStrED.sTxt.Menu
--- ADFS::HardDisc4.$.Public.stronged.se469f9s.!SrcStrED.sTxt.Menu 2016-01-10 00:18:59.0 +0100
+++ ADFS::HardDisc4.$.Public.stronged.src.!SrcStrED.sTxt.Menu 2017-08-27 17:04:46.0 +0100
@@ -2742,11 +2742,11 @@
TSTne R14,#(one_window + one_submenu) ; (FG) .. is the_one a window or a submenu?
MOVne R1,#0 ; (FG) .. if so, R1 = 0 => don't close menu
CMN R1,#1 ;
STReq R1,[R12,#openmenu%] ;
- SWI "Wimp_CreateMenu" ;
+ SWIeq "Wimp_CreateMenu" ;
;------ Close the The_One window if there's one open
LDR R14,[R12,#one_handle%] ;
CMP R14,#0 ;
diff -U 5 -r ADFS::HardDisc4.$.Public.stronged.se469f9s.!SrcStrED.sTxt.UserMessg ADFS::HardDisc4.$.Public.stronged.src.!SrcStrED.sTxt.UserMessg
--- ADFS::HardDisc4.$.Public.stronged.se469f9s.!SrcStrED.sTxt.UserMessg 2016-01-31 13:03:06.0 +0100
+++ ADFS::HardDisc4.$.Public.stronged.src.!SrcStrED.sTxt.UserMessg 2017-08-27 20:08:39.0 +0100
@@ -2653,11 +2653,11 @@
FN_Track (pass%,"CloseSaveBox")
STMFD R13!,{R0-R12,LR}
LDR R1,[R12,#one_handle%] ; (FG) get handle of one_window
CMP R1,#0 ; (FG) is there a one_window open?
- Beq CSB1 ; (FG) if not, just exit now
+ Beq CSBx ; (FG) if not, just exit now
;------ There is an open one_window, check if it's a savebox and close it if so.
LDR R1,[R12,#one_nr%] ; (FG) get type of one_window
SUB R1,R1,#savefirst% ; (FG)
@@ -5254,11 +5254,11 @@
FN_Track (pass%,"PushSaveRec")
STMFD R13!,{R0-R12,LR}
LDR R1,[R12,#one_handle%] ; (FG) get handle of one_window
CMP R1,#0 ; (FG) is there a one_window open?
- Beq CSB1 ; (FG) if not, just exit now
+ Beq PushSRx ; (FG) if not, just exit now
;------ There is an open one_window, check if it's a savebox.
LDR R1,[R12,#one_nr%] ; (FG) get type of one_window
SUB R1,R1,#savefirst% ; (FG)
@@ -5269,10 +5269,11 @@
ADDls R0,R12,#SaveRec% ; (FG)
LDRls R1,[R12,#SaveRecCopy%] ; (FG)
MOVls R2,#len_DTP% ; (FG)
BLls WordMove ; (FG)
+.PushSRx
LDMFD R13!,{R0-R12,PC}
;-------------------------------------------------------------------------------
;-------------------------------------------------------------------------------
@@ -5280,11 +5281,11 @@
FN_Track (pass%,"PullSaveRec")
STMFD R13!,{R0-R12,LR}
LDR R1,[R12,#one_handle%] ; (FG) get handle of one_window
CMP R1,#0 ; (FG) is there a one_window open?
- Beq CSB1 ; (FG) if not, just exit now
+ Beq PullSRx ; (FG) if not, just exit now
;------ There is an open one_window, check if it's a savebox.
LDR R1,[R12,#one_nr%] ; (FG) get type of one_window
SUB R1,R1,#savefirst% ; (FG)
@@ -5295,10 +5296,11 @@
LDRls R0,[R12,#SaveRecCopy%] ; (FG)
ADDls R1,R12,#SaveRec% ; (FG)
MOVls R2,#len_DTP% ; (FG)
BLls WordMove ; (FG)
+.PullSRx
LDMFD R13!,{R0-R12,PC}
;-------------------------------------------------------------------------------
; Sender wants contents of clipboard/block. If we have it, reply with DataSave msg.