Commit 0cbd2622 authored by Stewart Brodie's avatar Stewart Brodie
Browse files

Event ordering problems fixed (SNB-U002). Needs Window 1.51's co-operation...

Event ordering problems fixed (SNB-U002).  Needs Window 1.51's co-operation for this to work properly.

Version number now maintained by srccommit.

Version 1.42. Tagged as 'Toolbox-1_42'
parent 69417c0e
......@@ -21,14 +21,18 @@
# ---- ---- -----------
# 06-Jan-94 AMcC Created
# 04-Feb-98 SNB Updated to allow RAM builds
# 11-Jun-98 SNB Updated to allow debug builds and add -p option to cmhg.
#
.SUFFIXES: .c .o .od .s
#
# Component specific options:
#
COMPONENT = Toolbox
ROM_MODULE = aof.${COMPONENT}
RAM_MODULE = rm.${COMPONENT}
DBG_MODULE = rm.D${COMPONENT}
#
# Export Paths for Messages module
......@@ -99,13 +103,29 @@ RAM_OBJS =\
o.resf\
o.task
DBG_OBJS =\
o.Modhdr_NoD\
o.base\
o.callback\
od.event\
od.filters\
o.filter_ven\
od.globals\
od.mainRAM\
od.memory\
o.memswis\
od.object\
od.resf\
od.task
RESF=o.msgs
#
# Rule patterns
#
.c.o:; ${CC} ${CFLAGS} ${ROMFLAGS} -o $@ $<
.cmhg.o:; ${CMHG} -o $@ $<
.c.od:; ${CC} ${CFLAGS} ${ROMFLAGS} -Ddebugging=1 -o $@ $<
.cmhg.o:; ${CMHG} -p -o $@ $<
.s.o:; ${AS} ${AFLAGS} -o $@ $<
#
......@@ -135,6 +155,10 @@ clean:
${WIPE} map ${WFLAGS}
@echo ${COMPONENT}: cleaned
trace: ${DBG_MODULE}
@echo ${COMPONENT}: Debug module build (RAM)
${ROM_MODULE}: ${OBJS} ${TBOXLIB} ${ROMCSTUBS}
${MKDIR} aof
${LD} -o $@ -aof ${OBJS} ${TBOXLIB} ${ROMCSTUBS}
......@@ -160,9 +184,17 @@ ${RAM_MODULE}: ${RAM_OBJS} ${TBOXLIB} ${CLIB} ${RESF} ${CLIB}
${LD} -o $@ -module ${RAM_OBJS} ${TBOXLIB} ${RESF} ${CLIB}
Access $@ RW/R
${DBG_MODULE}: ${DBG_OBJS} ${TBOXLIB} ${CLIB} ${RESF} ${CLIB}
${mkdir} rm
${LD} -o $@ -module ${DBG_OBJS} ${TBOXLIB} ${RESF} ${CLIB} <Lib$Dir>.tboxlibint.o.debuglibm
Access $@ RW/R
o.mainRAM: main.c
$(CC) ${CFLAGS} -o $@ main.c
od.mainRAM: main.c
$(CC) ${CFLAGS} -Ddebugging=1 -o $@ main.c
#---------------------------------------------------------------------------
# Dynamic dependencies:
/* (1.41)
/* (1.42)
*
* This file is automatically maintained by srccommit, do not edit manually.
*
*/
#define Module_MajorVersion_CMHG 1.41
#define Module_MajorVersion_CMHG 1.42
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 09 Jun 1998
#define Module_Date_CMHG 11 Jun 1998
#define Module_MajorVersion "1.41"
#define Module_Version 141
#define Module_MajorVersion "1.42"
#define Module_Version 142
#define Module_MinorVersion ""
#define Module_Date "09 Jun 1998"
#define Module_Date "11 Jun 1998"
......@@ -45,6 +45,7 @@
#include "twimp.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "globals.h"
......@@ -582,6 +583,20 @@ extern int filters_postfilter (int event_code, wimp_PollBlock *p, TaskDescriptor
{
type = Toolbox_RegisterPostFilter_WimpMessage;
code = p->msg.hdr.action;
/* Addition for Toolbox 1.42 to try and solve the event ordering problems */
if (code == wimp_MMENU_WARNING) {
if (p->msg.hdr.your_ref == 0) {
/* Call Window SWI and ack message */
DEBUG debug_output("events", "T:Sending PreSubMenuShow\n");
_swix(Window_PreSubMenuShow, _IN(0), 0);
p->msg.hdr.your_ref = p->msg.hdr.my_ref;
if (!_swix(Wimp_SendMessage, _INR(0,2), 17, p, task->info.wimp_handle)) {
/* Intercept this event */
return -1;
}
DEBUG debug_output("events", "T:Sending PreSubMenuShow FAILED\n");
}
}
}
else if (event_code == wimp_ETOOLBOX_EVENT)
{
......@@ -641,6 +656,7 @@ extern int filters_postfilter (int event_code, wimp_PollBlock *p, TaskDescriptor
regs.r[3] = (int)id_block;
e = _kernel_swi (f->swi_to_call, &regs, &regs);
DEBUG {if (f->swi_to_call == 0x82881) debug_output ("events", "T:SWI exited OK\n");}
DEBUG {if (e) debug_output ("events", "T:error raised %s\n", e->errmess);}
......
......@@ -343,6 +343,9 @@ extern _kernel_oserror *Toolbox_SWI_handler(int swi_no, _kernel_swi_regs *r, voi
else
e = (*swis[swi_no])(r);
DEBUG debug_output ("SWIs", "T:Exit Toolbox SWI %d --> %s\n", swi_no,e?e->errmess:"<No Error>");
return e;
}
......
......@@ -47,6 +47,7 @@
#include "string32.h"
#include "messages.h"
#include "objects.toolbox.h"
#include "objects.window.h"
#include "globals.h"
......@@ -745,6 +746,17 @@ extern _kernel_oserror *object_show (_kernel_swi_regs *r)
return e;
}
/*
* If the object was being shown as a sub-menu show, then let Window
* know about it.
*/
if (r->r[0] & Toolbox_ShowObject_AsSubMenu)
{
DEBUG debug_output("object", "T:Submenu show. Informing Window module\n");
(void) _swix(Window_PreSubMenuShow, _IN(0), 0);
}
/*
* we don't even know if object is showing so just pass it on
......
......@@ -54,9 +54,11 @@
; 9-Feb-98: SNB: version 1.40
; NOTE: post AcornC/C++ release, use Service_Postinit to detect that we are
; starting up in the ROM start-up. In which case we don't send round
; starting up in the ROM start-up. In which case we do not send round
; service_toolboxstarting.
#include "VersionNum"
initialisation-code: Toolbox_init
finalisation-code: Toolbox_finalise
......@@ -65,7 +67,9 @@ service-call-handler: Toolbox_services 0x11, 0x53, 0x87, 0x73, 0x92
title-string: Toolbox
help-string: Toolbox 1.41
help-string: Toolbox Module_MajorVersion_CMHG Module_MinorVersion_CMHG
date-string: Module_Date_CMHG
command-keyword-table: Toolbox_commands
Toolbox_Memory()
......@@ -87,5 +91,3 @@ swi-decoding-table: Toolbox, CreateObject, DeleteObject,
Memory, DeRegisterObjectModule, TemplateLookUp,
GetInternalHandle, RegisterPostFilter, RegisterPreFilter,
RegisterObjectModule
date-string: 17 Feb 1998
......@@ -54,9 +54,11 @@
; 11-Feb-98: SNB: version 1.40
; NOTE: post AcornC/C++ release, use Service_Postinit to detect that we are
; starting up in the ROM start-up. In which case we don't send round
; starting up in the ROM start-up. In which case we do not send round
; service_toolboxstarting.
#include "VersionNum"
initialisation-code: Toolbox_init
finalisation-code: Toolbox_finalise
......@@ -65,7 +67,9 @@ service-call-handler: Toolbox_services 0x11, 0x53, 0x87, 0x73, 0x92
title-string: Toolbox
help-string: Toolbox 1.41
help-string: Toolbox Module_MajorVersion_CMHG Module_MinorVersion_CMHG
date-string: Module_Date_CMHG
swi-chunk-base-number: 0x44ec0
......@@ -74,7 +78,7 @@ swi-handler-code: Toolbox_SWI_handler
swi-decoding-table: Toolbox, CreateObject, DeleteObject,
CopyObject, ShowObject, HideObject,
GetObjectInfo, ObjectMiscOp, SetClientHandle,
GetClientHandle, GetObjectClass,
GetClientHandle, GetObjectClass,
GetParent, GetAncestor, GetTemplateName, RaiseToolboxEvent,
GetSysInfo, Initialise, LoadResources,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
......@@ -82,7 +86,5 @@ swi-decoding-table: Toolbox, CreateObject, DeleteObject,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
Memory, DeRegisterObjectModule, TemplateLookUp,
GetInternalHandle, RegisterPostFilter, RegisterPreFilter,
GetInternalHandle, RegisterPostFilter, RegisterPreFilter,
RegisterObjectModule
date-string: 17 Feb 1998
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