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 This should fix the bug Creepy spotted where the buttonbar event
initialization was crashing. 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 Summary: Enlightened terminal emulator
Name: Eterm Name: Eterm
Version: 0.9.2 Version: 0.9.2
Release: 1 Release: 0.1
Copyright: BSD Copyright: BSD
Group: User Interface/X Group: User Interface/X
%if %{bzip} %if %{bzip}
@ -34,7 +34,7 @@ have the Imlib2 library installed.
# macros I use for compatibility with older versions of the macro # macros I use for compatibility with older versions of the macro
%configure --bindir=%{_bindir} --libdir=%{_libdir} --mandir=%{_mandir} \ %configure --bindir=%{_bindir} --libdir=%{_libdir} --mandir=%{_mandir} \
--datadir=%{_datadir} --sysconfdir=%{_sysconfdir} \ --datadir=%{_datadir} --sysconfdir=%{_sysconfdir} \
--with-backspace=bs --with-delete=execute --enable-multi-charset --enable-multi-charset --enable-escreen
make make
%install %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); XSetWindowBackgroundPixmap(Xdisplay, bbar->win, bbar->bg);
XClearWindow(Xdisplay, bbar->win); XClearWindow(Xdisplay, bbar->win);
XSetForeground(Xdisplay, bbar->gc, images[image_bbar].norm->fg); XSetForeground(Xdisplay, bbar->gc, images[image_bbar].norm->fg);
if (bbar->current) {
bbar_select_button(bbar, bbar->current);
}
} }
void void

View File

@ -2457,14 +2457,23 @@ upd_disp(void *xd, int n, int flags, char *name)
button = bbar->buttons; button = bbar->buttons;
for (; (n > 0) && (button->next); n--, button = button->next); 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))) { if (name && (!button->text || strcmp(name, button->text))) {
button_set_text(button, name); button_set_text(button, name);
} }
/* Update flags */
if (flags >= 0) { if (flags >= 0) {
button->flags = (flags | NS_SCREAM_BUTTON); button->flags = (flags | NS_SCREAM_BUTTON);
} }
/* Redraw buttonbar to reflect new information */
bbar_redraw(bbar); bbar_redraw(bbar);
return NS_SUCC; return NS_SUCC;

View File

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

View File

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