Set focus to next available window when gui_window is closed.

svn path=/trunk/netsurf/; revision=12824
This commit is contained in:
Ole Loots 2011-09-20 20:09:42 +00:00
parent a77b08a762
commit 8b445036f3
2 changed files with 16 additions and 7 deletions

View File

@ -186,7 +186,8 @@ void gui_poll(bool active)
} }
if( evnt.timer != 0 && !active ){ if( evnt.timer != 0 && !active ){
/* this suits for stuff with lower priority */ /* this suits for stuff with lower priority */
hotlist_redraw(); //hotlist_redraw();
atari_treeview_redraw( hl.tv );
} }
} }
@ -257,11 +258,18 @@ void gui_window_destroy(struct gui_window *w)
if( w->next != NULL ) { if( w->next != NULL ) {
w->next->prev = w->prev; w->next->prev = w->prev;
} }
if( input_window == w ) {
input_window = window_list;
}
free(w); free(w);
w = NULL; w = NULL;
w = window_list;
int dummy=0;
while( w != NULL ) {
if( w->root ) {
input_window = w;
break;
}
w = w->next;
}
} }
void gui_window_get_dimensions(struct gui_window *w, int *width, int *height, void gui_window_get_dimensions(struct gui_window *w, int *width, int *height,

View File

@ -116,7 +116,8 @@ struct s_gui_win_root
float scale; float scale;
bool throbbing; bool throbbing;
char * title; char * title;
GRECT loc; /* current size of window on screen */ /* current size of window on screen: */
GRECT loc;
}; };
/* /*