Tue Jun 18 16:24:03 2002 Michael Jennings (mej)

Fixed the flickering of the buttonbar caused by Escreen updates.

Also fixed the deselecting of the current button on redraw.


SVN revision: 6324
This commit is contained in:
Michael Jennings 2002-06-18 20:27:41 +00:00
parent 4e84d0f65b
commit 7a1154f3d3
6 changed files with 34 additions and 16 deletions

View File

@ -4711,3 +4711,9 @@ Fri Jun 14 09:05:49 2002 Michael Jennings (mej)
This should fix the bug Creepy spotted where the buttonbar event
initialization was crashing.
----------------------------------------------------------------------
Tue Jun 18 16:24:03 2002 Michael Jennings (mej)
Fixed the flickering of the buttonbar caused by Escreen updates.
Also fixed the deselecting of the current button on redraw.
----------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
Summary: Enlightened terminal emulator
Name: Eterm
Version: 0.9.2
Release: 1
Release: 0.1
Copyright: BSD
Group: User Interface/X
%if %{bzip}
@ -34,7 +34,7 @@ have the Imlib2 library installed.
# macros I use for compatibility with older versions of the macro
%configure --bindir=%{_bindir} --libdir=%{_libdir} --mandir=%{_mandir} \
--datadir=%{_datadir} --sysconfdir=%{_sysconfdir} \
--with-backspace=bs --with-delete=execute --enable-multi-charset
--enable-multi-charset --enable-escreen
make
%install

View File

@ -1113,6 +1113,9 @@ bbar_draw(buttonbar_t *bbar, unsigned char image_state, unsigned char force_mode
XSetWindowBackgroundPixmap(Xdisplay, bbar->win, bbar->bg);
XClearWindow(Xdisplay, bbar->win);
XSetForeground(Xdisplay, bbar->gc, images[image_bbar].norm->fg);
if (bbar->current) {
bbar_select_button(bbar, bbar->current);
}
}
void

View File

@ -2457,14 +2457,23 @@ upd_disp(void *xd, int n, int flags, char *name)
button = bbar->buttons;
for (; (n > 0) && (button->next); n--, button = button->next);
/* See if we actually need to update anything. If not, don't. */
if ((name && button->text && !strcmp(name, button->text))
&& ((flags | NS_SCREAM_BUTTON) == button->flags)) {
return NS_SUCC;
}
/* Update display name */
if (name && (!button->text || strcmp(name, button->text))) {
button_set_text(button, name);
}
/* Update flags */
if (flags >= 0) {
button->flags = (flags | NS_SCREAM_BUTTON);
}
/* Redraw buttonbar to reflect new information */
bbar_redraw(bbar);
return NS_SUCC;

View File

@ -39,7 +39,7 @@
#include <errno.h> /* errno */
#include "config.h"
#include "src/feature.h"
#include "feature.h"
/* use libast if we have it */
#ifdef DEBUG_ESCREEN

View File

@ -58,15 +58,15 @@ static eterm_script_handler_t script_handlers[] = {
{"string", script_handler_string},
{"dialog", script_handler_dialog},
#ifdef ESCREEN
{"es_display", script_handler_display},
{"es_disp", script_handler_display},
{"es_region", script_handler_region},
{"es_reg", script_handler_region},
{"es_win", script_handler_region},
{"es_window", script_handler_region},
{"es_statement", script_handler_statement},
{"es_reset", script_handler_reset},
{"es_rst", script_handler_reset},
{"es_display", script_handler_es_display},
{"es_disp", script_handler_es_display},
{"es_region", script_handler_es_region},
{"es_reg", script_handler_es_region},
{"es_win", script_handler_es_region},
{"es_window", script_handler_es_region},
{"es_statement", script_handler_es_statement},
{"es_reset", script_handler_es_reset},
{"es_rst", script_handler_es_reset},
#endif
{"nop", script_handler_nop}
@ -452,7 +452,7 @@ script_handler_dialog(char **params)
#ifdef ESCREEN
void
script_handler_display(char **params)
script_handler_es_display(char **params)
{
_ns_sess *sess = TermWin.screen;
char *p, *a;
@ -519,7 +519,7 @@ script_handler_display(char **params)
}
void
script_handler_region(char **params)
script_handler_es_region(char **params)
{
_ns_sess *sess = TermWin.screen;
_ns_disp *disp;
@ -596,7 +596,7 @@ script_handler_region(char **params)
}
void
script_handler_statement(char **params)
script_handler_es_statement(char **params)
{
char *tmp;
@ -610,7 +610,7 @@ script_handler_statement(char **params)
}
void
script_handler_reset(char **params)
script_handler_es_reset(char **params)
{
USE_VAR(params);
ns_reset(TermWin.screen, 0);