The program_handler_add() mechanism relied on being used after the initialization of the program_handler (and the ctk) process but before entering the event handling. In Contiki 2.x there's no such explicit process initialization anymore - and the implicit asynchronous initialization runs after program_handler_add(). Therefore the initialization of the data structures modified by program_handler_add() had to be removed from that asynchronous process initialization. Instead C-langugae global data.initialization is used.
This commit is contained in:
parent
ad7bbcdf17
commit
d4a00f67fe
2 changed files with 4 additions and 11 deletions
|
@ -43,7 +43,7 @@
|
|||
*
|
||||
* This file is part of the Contiki desktop OS
|
||||
*
|
||||
* $Id: program-handler.c,v 1.1 2006/06/17 22:41:12 adamdunkels Exp $
|
||||
* $Id: program-handler.c,v 1.2 2006/08/15 00:11:45 oliverschmidt Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
|||
|
||||
|
||||
/* Menus */
|
||||
static struct ctk_menu contikimenu;
|
||||
static struct ctk_menu contikimenu = {NULL, "Contiki", 7, 0, 0};
|
||||
|
||||
#ifndef PROGRAM_HANDLER_CONF_MAX_NUMDSCS
|
||||
#define MAX_NUMDSCS 10
|
||||
|
@ -278,7 +278,6 @@ PROCESS_THREAD(program_handler_process, ev, data)
|
|||
PROCESS_BEGIN();
|
||||
|
||||
/* Create the menus */
|
||||
ctk_menu_new(&contikimenu, "Contiki");
|
||||
ctk_menu_add(&contikimenu);
|
||||
#if WITH_LOADER_ARCH
|
||||
runmenuitem = ctk_menuitem_add(&contikimenu, "Run program...");
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* $Id: ctk.c,v 1.2 2006/08/13 14:11:41 oliverschmidt Exp $
|
||||
* $Id: ctk.c,v 1.3 2006/08/15 00:13:23 oliverschmidt Exp $
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -1360,12 +1360,8 @@ PROCESS_THREAD(ctk_process, ev, data)
|
|||
ctk_mouse_show();
|
||||
#endif /* CTK_CONF_MOUSE_SUPPORT */
|
||||
|
||||
ctk_draw_init();
|
||||
ctk_restore();
|
||||
|
||||
height = ctk_draw_height();
|
||||
width = ctk_draw_width();
|
||||
|
||||
desktop_window.active = NULL;
|
||||
desktop_window.owner = &ctk_process;
|
||||
|
||||
ctk_signal_keypress = process_alloc_event();
|
||||
|
@ -1397,8 +1393,6 @@ PROCESS_THREAD(ctk_process, ev, data)
|
|||
iconx = ICONX_START;
|
||||
icony = ICONY_START;
|
||||
|
||||
redraw = REDRAW_ALL;
|
||||
|
||||
timer_set(&timer, CLOCK_SECOND);
|
||||
|
||||
while(1) {
|
||||
|
|
Loading…
Reference in a new issue