Commit f5ce841e authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix text window remaining active after desktop has been reached

Detail:
  c/bootfx - Make sure not_in_desktop returns false once Service_DesktopWelcome has been seen. This ensures mode_has_changed doesn't fiddle with the text window or try to do anything else if single-tasking apps are run once the desktop has been reached.
Admin:
  Tested on Raspberry Pi
  F12 -> *BASIC -> MODE MODE, or executing mode changes from a double-clicked BASIC file, no longer results in BootFX's text window being applied.


Version 0.05. Tagged as 'BootFX-0_05'
parent 5aa7fe73
/* (0.04)
/* (0.05)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.04
#define Module_MajorVersion_CMHG 0.05
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 08 Oct 2012
#define Module_Date_CMHG 09 Oct 2012
#define Module_MajorVersion "0.04"
#define Module_Version 4
#define Module_MajorVersion "0.05"
#define Module_Version 5
#define Module_MinorVersion ""
#define Module_Date "08 Oct 2012"
#define Module_Date "09 Oct 2012"
#define Module_ApplicationDate "08-Oct-12"
#define Module_ApplicationDate "09-Oct-12"
#define Module_ComponentName "BootFX"
#define Module_ComponentPath "bsd/RiscOS/Sources/Video/UserI/BootFX"
#define Module_FullVersion "0.04"
#define Module_HelpVersion "0.04 (08 Oct 2012)"
#define Module_LibraryVersionInfo "0:4"
#define Module_FullVersion "0.05"
#define Module_HelpVersion "0.05 (09 Oct 2012)"
#define Module_LibraryVersionInfo "0:5"
......@@ -198,6 +198,7 @@ static size_t splash_size = 0; /**< Size (bytes) of the splash s
static void *Workspace = NULL; /**< Module workspace pointer. */
static uint32_t scale_matrix[4]; /**< Scale factor block (for current mode). */
static uint32_t pixel_trans[4]; /**< Pixel translation table (for current mode). */
static bool desktop_welcome = false; /**< Seen Service_DesktopWelcome yet? */
/********************************************************************************
......@@ -558,6 +559,11 @@ static bool not_in_desktop(void)
_kernel_oserror *err;
uint32_t state;
/* Always claim we're in the desktop once Service_DesktopWelcome has been seen
Avoids us messing with things if a single-tasking app is run */
if (desktop_welcome)
return false;
err = _swix(Wimp_ReadSysInfo, _IN(0) | _OUT(0), 3, &state);
return (err || state == 1) ? false : true;
}
......@@ -1055,6 +1061,9 @@ void Module_Service(int service_number, _kernel_swi_regs *r, void *pw)
/* Discard the progress bar sprite data (and free the buffer) */
(void) cli_free(NULL);
/* Remember that the desktop has now been reached */
desktop_welcome = true;
/* Claim this service call to stop the desktop banner window */
r->r[1] = 0;
break;
......
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