Fri Apr 26 14:28:08 2002 Michael Jennings (mej)

Reverted Charles Clancy's shading patch (from the 21st) since it
breaks 24bpp on Linux.  Hopefully there is a better fix.

Fixed an ASSERT failure in the buttonbar redraw pointed out by
Laurence J. Lane <ljlane@debian.org>.

Also made multiple buttonbars work properly.


SVN revision: 6182
eterm-0.10
Michael Jennings 21 years ago
parent d6c4f56dcc
commit bba5179976
  1. 10
      ChangeLog
  2. 1264
      src/buttons.c
  3. 7
      src/buttons.h
  4. 45
      src/eterm_utmp.h
  5. 8
      src/pixmap.c
  6. 54
      src/utmp.c

@ -4597,3 +4597,13 @@ Wed Apr 24 22:34:59 2002 Michael Jennings (mej)
Fix warning.
----------------------------------------------------------------------
Fri Apr 26 14:28:08 2002 Michael Jennings (mej)
Reverted Charles Clancy's shading patch (from the 21st) since it
breaks 24bpp on Linux. Hopefully there is a better fix.
Fixed an ASSERT failure in the buttonbar redraw pointed out by
Laurence J. Lane <ljlane@debian.org>.
Also made multiple buttonbars work properly.
----------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

@ -85,6 +85,7 @@ typedef struct buttonbar_struct {
#endif
unsigned short fwidth, fheight, fascent, fdescent;
event_dispatcher_data_t event_data;
unsigned char image_state;
button_t *buttons, *rbuttons, *current;
struct buttonbar_struct *next;
} buttonbar_t;
@ -106,10 +107,11 @@ extern unsigned char bbar_handle_button_press(event_t *);
extern unsigned char bbar_handle_button_release(event_t *);
extern unsigned char bbar_handle_motion_notify(event_t *);
extern unsigned char bbar_dispatch_event(event_t *);
extern buttonbar_t *find_bbar_by_window(Window);
extern void bbar_add(buttonbar_t *bbar);
extern unsigned short bbar_calc_height(buttonbar_t *bbar);
extern void bbar_calc_sizes(buttonbar_t *bbar);
extern void bbar_calc_positions(buttonbar_t *bbar);
extern void bbar_calc_button_sizes(buttonbar_t *bbar);
extern void bbar_calc_button_positions(buttonbar_t *bbar);
extern void button_calc_size(buttonbar_t *bbar, button_t *button);
extern void button_calc_rel_coords(buttonbar_t *bbar, button_t *button);
extern void bbar_add_button(buttonbar_t *bbar, button_t *button);
@ -132,6 +134,7 @@ extern void bbar_resize_all(int width);
extern void bbar_dock(buttonbar_t *bbar, unsigned char dock);
extern void bbar_draw(buttonbar_t *bbar, unsigned char image_state, unsigned char force_modes);
extern void bbar_draw_all(unsigned char image_state, unsigned char force_modes);
extern void bbar_calc_positions(void);
extern unsigned long bbar_calc_total_height(void);
extern unsigned long bbar_calc_docked_height(unsigned char);

@ -28,6 +28,51 @@
#include <X11/Intrinsic.h> /* Xlib, Xutil, Xresource, Xfuncproto */
#ifdef UTMP_SUPPORT
# include <stdio.h>
# include <string.h>
/* For some systems (HP-UX in particular), sys/types.h must be included
before utmp*.h -- mej */
# include <sys/types.h>
# include <sys/stat.h>
/* Unsupported/broken utmpx.h on HP-UX, AIX, and glibc 2.1 */
# if defined(_HPUX_SOURCE) || defined(_AIX) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1))
# undef HAVE_UTMPX_H
# endif
# ifdef HAVE_UTMPX_H
# include <utmpx.h>
# define USE_SYSV_UTMP
# else
# include <utmp.h>
# ifdef HAVE_SETUTENT
# define USE_SYSV_UTMP
# endif
# endif
# ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
# include <pwd.h>
# include <errno.h>
# ifdef HAVE_FCNTL_H
# include <fcntl.h>
# endif
# ifdef HAVE_LASTLOG_H
# include <lastlog.h>
# endif
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__)
# include <ttyent.h>
# endif
# ifdef HAVE_LIBUTEMPTER
# include <utempter.h>
# define add_utmp_entry(p, h, f) addToUtmp(p, h, f)

@ -824,7 +824,7 @@ redraw_image(unsigned char which) {
case image_button:
case image_bbar:
case image_gbar:
bbar_draw(buttonbar, IMAGE_STATE_CURRENT, MODE_MASK);
bbar_draw_all(IMAGE_STATE_CURRENT, MODE_MASK);
break;
default:
D_PIXMAP(("Bad value %u\n", which));
@ -843,7 +843,7 @@ redraw_images_by_mode(unsigned char mode) {
scr_touch();
}
scrollbar_draw(IMAGE_STATE_CURRENT, mode);
bbar_draw(buttonbar, IMAGE_STATE_CURRENT, mode);
bbar_draw_all(IMAGE_STATE_CURRENT, mode);
}
}
#endif /* PIXMAP_SUPPORT */
@ -1778,10 +1778,8 @@ colormod_trans(Pixmap p, imlib_t *iml, GC gc, unsigned short w, unsigned short h
case 24:
if (ximg->bits_per_pixel != 32) {
shade_ximage_24(ximg->data, ximg->bytes_per_line, w, h, rm, gm, bm);
} else {
shade_ximage_24(ximg->data, ximg->bytes_per_line, w * 4 / 3, h, rm, gm, bm);
}
break;
/* drop */
case 32:
#ifdef HAVE_MMX
shade_ximage_32_mmx(ximg->data, ximg->bytes_per_line, w, h, rm, gm, bm);

@ -26,69 +26,23 @@ static const char cvs_ident[] = "$Id$";
#include "config.h"
#include "feature.h"
#ifdef UTMP_SUPPORT
# include <stdio.h>
# include <string.h>
/* For some systems (HP-UX in particular), sys/types.h must be included
before utmp*.h -- mej */
# include <sys/types.h>
# include <sys/stat.h>
/* Unsupported/broken utmpx.h on HP-UX, AIX, and glibc 2.1 */
# if defined(_HPUX_SOURCE) || defined(_AIX) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1))
# undef HAVE_UTMPX_H
# endif
# ifdef HAVE_UTMPX_H
# include <utmpx.h>
# define USE_SYSV_UTMP
# else
# include <utmp.h>
# ifdef HAVE_SETUTENT
# define USE_SYSV_UTMP
# endif
# endif
# ifdef TIME_WITH_SYS_TIME
# include <sys/time.h>
# include <time.h>
# else
# ifdef HAVE_SYS_TIME_H
# include <sys/time.h>
# else
# include <time.h>
# endif
# endif
# ifdef HAVE_UNISTD_H
# include <unistd.h>
# endif
# include <pwd.h>
# include <errno.h>
# ifdef HAVE_FCNTL_H
# include <fcntl.h>
# endif
# ifdef HAVE_LASTLOG_H
# include <lastlog.h>
# endif
# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__bsdi__)
# include <ttyent.h>
# endif
# include "eterm_utmp.h"
# include "command.h"
# include "screen.h"
#if defined(UTMP_SUPPORT) && !defined(HAVE_LIBUTEMPTER)
/* screen.h includes config.h again, so re-fix these. Pointed out by Sung-Hyun Nam <namsh@lgic.co.kr> */
# if defined(_HPUX_SOURCE) || defined(_AIX) || ((__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1))
# undef HAVE_UTMPX_H
# endif
/* don't go off end of ut_id & remember if an entry has been made */
# ifndef HAVE_LIBUTEMPTER
# if defined(USE_SYSV_UTMP) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__bsdi__)
static char ut_id[5]; /* remember if entry to utmp made */
# else
static int utmp_pos; /* BSD position of utmp-stamp */
# endif
# endif
# ifdef USE_SYSV_UTMP
@ -98,7 +52,6 @@ static int utmp_pos; /* BSD position of utmp-stamp */
# define update_wtmp updwtmpx
# else /* HAVE_UTMPX_H */
# ifndef HAVE_LIBUTEMPTER
static void
update_wtmp(char *fname, struct utmp *putmp)
{
@ -134,10 +87,8 @@ update_wtmp(char *fname, struct utmp *putmp)
close(fd);
}
# endif /* ifndef HAVE_LIBUTEMPTER */
# endif /* HAVE_UTMPX_H */
# ifndef HAVE_LIBUTEMPTER
void
add_utmp_entry(const char *pty, const char *hostname, int fd)
{
@ -266,7 +217,6 @@ remove_utmp_entry(void)
endutent();
# endif /* HAVE_UTMPX_H */
}
# endif /* ifndef HAVE_LIBUTEMPTER */
# else /* USE_SYSV_UTMP */
/* BSD utmp support */

Loading…
Cancel
Save