🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.acorn.tech
1 messages
1 total messages Started by Pete Goodwin Tue, 13 Oct 1992 07:46
Templates, RO3.1 and the dreaded Address Exception in the WindowManager
#305
Author: Pete Goodwin
Date: Tue, 13 Oct 1992 07:46
37 lines
1559 bytes
After reading about the problem with 3d icons in templates, mainly when a 3d
icon is clicked to quit the application, I had a look at writing some code in C
to fix the problem:

/* The alarm handler to do the exit */
static void delayed_shutdown(int at, void *handle)
{
    wimp_mousestr mouse;

    /* Get the state of the mouse */
    wimpt_complain(wimp_get_point_info(&mouse));

    /* Check SELECT, MENU and ADJUST buttons */
    if (mouse.bbits & (wimp_BLEFT | wimp_BMID | wimp_BRIGHT))

	/* A button is still pressed, reschedule this handler */
	alarm_set(alarm_timenow() + 10, delayed_shutdown, NULL);
    else

	/* All buttons released, safely exit */
	exit(EXIT_SUCCESS);
}

/* Call this routine when you want to exit */
static void delayed_exit(void)
{
    /* Install handler */
    alarm_set(alarm_timenow() + 10, delayed_shutdown, NULL);
}

This appears to solve the problem (i.e you don't get the address exception at
address 0x03nnnnnn somewhere in the WindowManager module), though there may be
more elegant ways of doing it.

Pete Goodwin
goodwin@system.enet.dec.com
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads