Bugfix: avoid a possible freeze under OpenBSD when changing color from within the configuration screen.
This commit is contained in:
parent
8859475550
commit
78c0495587
@ -1,3 +1,11 @@
|
|||||||
|
2009-06-20 Frederic Culot <frederic@culot.org>
|
||||||
|
|
||||||
|
* src/custom.c (set_confwin_attr): new function
|
||||||
|
|
||||||
|
* src/custom.c: fix a bug that caused calcurse to freeze under
|
||||||
|
OpenBSD when changing theme color from within the configuration
|
||||||
|
screen
|
||||||
|
|
||||||
2009-06-01 Frederic Culot <frederic@culot.org>
|
2009-06-01 Frederic Culot <frederic@culot.org>
|
||||||
|
|
||||||
* src/io.c: patch submitted by Francois Boulogne to fix gcc
|
* src/io.c: patch submitted by Francois Boulogne to fix gcc
|
||||||
|
15
src/custom.c
15
src/custom.c
@ -1,4 +1,4 @@
|
|||||||
/* $calcurse: custom.c,v 1.37 2009/01/24 14:44:25 culot Exp $ */
|
/* $calcurse: custom.c,v 1.38 2009/06/20 10:41:12 culot Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calcurse - text-based organizer
|
* Calcurse - text-based organizer
|
||||||
@ -542,6 +542,14 @@ custom_layout_config (void)
|
|||||||
#undef NBLAYOUTS
|
#undef NBLAYOUTS
|
||||||
#undef LAYOUTSPERCOL
|
#undef LAYOUTSPERCOL
|
||||||
|
|
||||||
|
static void
|
||||||
|
set_confwin_attr (window_t *cwin)
|
||||||
|
{
|
||||||
|
cwin->h = (notify_bar ())? row - 3 : row - 2;
|
||||||
|
cwin->w = col;
|
||||||
|
cwin->x = cwin->y = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Create a configuration window and initialize status and notification bar
|
* Create a configuration window and initialize status and notification bar
|
||||||
* (useful in case of window resize).
|
* (useful in case of window resize).
|
||||||
@ -557,8 +565,8 @@ custom_confwin_init (window_t *confwin, char *label)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wins_get_config ();
|
wins_get_config ();
|
||||||
confwin->h = (notify_bar ())? row - 3 : row - 2;
|
set_confwin_attr (confwin);
|
||||||
confwin->p = newwin (confwin->h, col, 0, 0);
|
confwin->p = newwin (confwin->h, col, 0, 0);
|
||||||
box (confwin->p, 0, 0);
|
box (confwin->p, 0, 0);
|
||||||
wins_show (confwin->p, label);
|
wins_show (confwin->p, label);
|
||||||
delwin (win[STA].p);
|
delwin (win[STA].p);
|
||||||
@ -735,6 +743,7 @@ custom_color_config (void)
|
|||||||
need_reset = 1;
|
need_reset = 1;
|
||||||
theme_changed = 0;
|
theme_changed = 0;
|
||||||
conf_win.p = 0;
|
conf_win.p = 0;
|
||||||
|
set_confwin_attr (&conf_win);
|
||||||
display_color_config (&conf_win, &mark_fore, &mark_back, cursor,
|
display_color_config (&conf_win, &mark_fore, &mark_back, cursor,
|
||||||
need_reset, theme_changed);
|
need_reset, theme_changed);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user