Tue Sep 28 14:18:44 PDT 1999 Michael Jennings <mej@eterm.org>

Several fixes here, some of which I forgot to commit a couple days
	ago.  Oopsie. =)


SVN revision: 438
This commit is contained in:
Michael Jennings 1999-09-28 19:38:43 +00:00
parent 5cf9f10625
commit 3630db17ab
20 changed files with 57 additions and 79 deletions

View File

@ -2494,3 +2494,9 @@ Fri Sep 24 13:05:40 PDT 1999 Michael Jennings <mej@eterm.org>
would hang if you had anything in auto mode and restarted E.
-------------------------------------------------------------------------------
Tue Sep 28 14:18:44 PDT 1999 Michael Jennings <mej@eterm.org>
Several fixes here, some of which I forgot to commit a couple days
ago. Oopsie. =)
-------------------------------------------------------------------------------

View File

@ -12,7 +12,7 @@ Eterm_SOURCES = main.c
Eterm_DEPENDENCIES = libEterm.la
Eterm_LDFLAGS = -rpath $(libdir):$(pkglibdir)
INCLUDES = -I. -I$(top_srcdir)/libmej -I.. -I$(includedir) -I$(prefix)/include $(X_CFLAGS)
INCLUDES = -I. -I$(top_srcdir) -I$(top_srcdir)/libmej -I.. -I$(includedir) -I$(prefix)/include $(X_CFLAGS)
LDADD = libEterm.la $(top_builddir)/libmej/libmej.la -L$(libdir) -L$(prefix)/lib $(LIBS) $(GRLIBS) $(X_LIBS)
EXTRA_DIST = actions.h command.h debug.h e.h eterm_utmp.h events.h feature.h font.h graphics.h grkelot.h grx.h main.h menus.h misc.h \

View File

@ -1775,13 +1775,13 @@ static void
xim_get_area(XRectangle *preedit_rect, XRectangle *status_rect,
XRectangle *needed_rect)
{
preedit_rect->x = needed_rect->width + (scrollbar_visible() && !(Options & Opt_scrollBar_right) ? (scrollBar.width) : 0);
preedit_rect->x = needed_rect->width + (scrollbar_visible() && !(Options & Opt_scrollBar_right) ? (scrollbar_trough_width()) : 0);
preedit_rect->y = Height2Pixel(TermWin.nrow - 1);
preedit_rect->width = Width2Pixel(TermWin.ncol + 1) - needed_rect->width + (!(Options & Opt_scrollBar_right) ? (scrollBar.width) : 0);
preedit_rect->width = Width2Pixel(TermWin.ncol + 1) - needed_rect->width + (!(Options & Opt_scrollBar_right) ? (scrollbar_trough_width()) : 0);
preedit_rect->height = Height2Pixel(1);
status_rect->x = (scrollbar_visible() && !(Options & Opt_scrollBar_right)) ? (scrollBar.width) : 0;
status_rect->x = (scrollbar_visible() && !(Options & Opt_scrollBar_right)) ? (scrollbar_trough_width()) : 0;
status_rect->y = Height2Pixel(TermWin.nrow - 1);
status_rect->width = needed_rect->width ? needed_rect->width : Width2Pixel(TermWin.ncol + 1);

View File

@ -53,7 +53,6 @@
# define DndLink 7
#endif
# define menuBar_esc 10
# define scrollBar_esc 30
/* Motif window hints */

View File

@ -50,6 +50,7 @@ extern void enl_query_for_image(unsigned char);
extern void eterm_ipc_parse(char *);
extern void eterm_ipc_send(char *);
extern char *eterm_ipc_get(void);
extern char *enl_send_and_wait(char *);
extern void eterm_handle_winop(char *);
_XFUNCPROTOEND

View File

@ -57,7 +57,7 @@ unsigned char keypress_exit = 0;
event_master_t event_master;
event_dispatcher_data_t primary_data;
mouse_button_state_t button_state =
{0, 0, 0, 0, 0, 0, 0};
{0, 0, 0, 0, 0, 0, 0, 0};
/********** The Event Handling Subsystem **********/
void
@ -504,6 +504,7 @@ handle_button_press(event_t * ev)
XSetInputFocus(Xdisplay, Xroot, RevertToNone, CurrentTime);
}
if (action_dispatch(ev, 0)) {
button_state.ignore_release = 1;
return 1;
}
@ -565,6 +566,11 @@ handle_button_release(event_t * ev)
D_EVENTS(("handle_button_release(ev [0x%08x] on window 0x%08x)\n", ev, ev->xany.window));
if (button_state.ignore_release == 1) {
button_state.ignore_release = 0;
return 0;
}
REQUIRE_RVAL(XEVENT_IS_MYWIN(ev, &primary_data), 0);
button_state.mouse_offset = 0;
button_state.report_mode = (button_state.bypass_keystate ? 0 : ((PrivateModes & PrivMode_mouse_report) ? 1 : 0));
@ -596,17 +602,11 @@ handle_button_release(event_t * ev)
switch (ev->xbutton.button) {
case Button1:
case Button3:
#if defined(CTRL_CLICK_RAISE) || defined(CTRL_CLICK_MENU)
if (!(ev->xbutton.state & ControlMask))
#endif
selection_make(ev->xbutton.time);
selection_make(ev->xbutton.time);
break;
case Button2:
#ifdef CTRL_CLICK_SCROLLBAR
if (!(ev->xbutton.state & ControlMask))
#endif
selection_request(ev->xbutton.time, ev->xbutton.x, ev->xbutton.y);
selection_request(ev->xbutton.time, ev->xbutton.x, ev->xbutton.y);
break;
case Button4:
scr_page(UP, (ev->xbutton.state & ShiftMask) ? 1 : 5);

View File

@ -80,6 +80,7 @@ typedef struct {
typedef struct {
unsigned short clicks, bypass_keystate, report_mode, mouse_offset;
Time button_press, last_button_press, activate_time;
unsigned char ignore_release;
} mouse_button_state_t;
/************ Variables ************/

View File

@ -192,21 +192,6 @@
/* #define SCROLLBAR_INITIAL_DELAY 40 */
/* #define SCROLLBAR_CONTINUOUS_DELAY 2 */
/* An alternative placement of the menubar shadow */
/* #define MENUBAR_SHADOW_IN */
/* An alternative placement of the menu shadow */
#define MENU_SHADOW_IN
/* Allow Ctrl+Button1 in a window to raise and steal focus */
#define CTRL_CLICK_RAISE
/* Allow Ctrl+Button2 in a window to toggle the scrollbar */
#define CTRL_CLICK_SCROLLBAR
/* Allow Ctrl+Button3 in a window to toggle the menubar */
#define CTRL_CLICK_MENU
/********************* Multi-lingual support options *********************/
/* Allow option/attribute for Meta to set the 8th bit */
@ -297,8 +282,8 @@
# define FONT4 "13x26"
#else /* MULTI_CHARSET */
# define FONT0 "fixed"
# define FONT1 "6x10"
# define FONT2 "6x13"
# define FONT1 "5x7"
# define FONT2 "6x10"
# define FONT3 "7x14"
# define FONT4 "8x13"
#endif /* MULTI_CHARSET */
@ -331,7 +316,7 @@ inline void *memmove(void *, const void *, size_t);
/* COLORTERM, TERM environment variables */
#ifdef MULTI_CHARSET
# define TERMENV "kterm"
# define COLORTERMENV "Kterm"
# define COLORTERMENV "Eterm"
#else
# define TERMENV "xterm"
# define COLORTERMENV "Eterm"

View File

@ -65,10 +65,10 @@ typedef struct font_struct {
/************ Variables ************/
extern unsigned char font_change_count;
extern const char *def_fontName[];
extern const char *rs_font[NFONTS];
extern char *rs_font[NFONTS];
# ifdef MULTI_CHARSET
extern const char *def_mfontName[];
extern const char *rs_mfont[NFONTS];
extern char *rs_mfont[NFONTS];
# endif
/************ Function Prototypes ************/

View File

@ -200,11 +200,11 @@ char *rs_preeditType = NULL;
#endif
char *rs_name = NULL;
#ifndef NO_BOLDFONT
const char *rs_boldFont = NULL;
char *rs_boldFont = NULL;
#endif
const char *rs_font[NFONTS];
char *rs_font[NFONTS];
#ifdef MULTI_CHARSET
const char *rs_mfont[NFONTS];
char *rs_mfont[NFONTS];
#endif
#ifdef PRINTPIPE
char *rs_print_pipe = NULL;
@ -782,16 +782,6 @@ version(void)
#else
printf(" -SCROLLBAR_BUTTON_CONTINUAL_SCROLLING");
#endif
#ifdef MENU_SHADOW_IN
printf(" +MENU_SHADOW_IN");
#else
printf(" -MENU_SHADOW_IN");
#endif
#ifdef CTRL_CLICK_RAISE
printf(" +CTRL_CLICK_RAISE");
#else
printf(" -CTRL_CLICK_RAISE");
#endif
#ifdef META8_OPTION
printf(" +META8_OPTION");
#else
@ -2470,6 +2460,8 @@ parse_image(char *buff)
images[idx].mode = (MODE_VIEWPORT | ALLOW_VIEWPORT);
} else if (!BEG_STRCASECMP(mode, "auto ")) {
images[idx].mode = (MODE_AUTO | ALLOW_AUTO);
} else if (!BEG_STRCASECMP(mode, "solid ")) {
images[idx].mode = MODE_SOLID;
} else {
print_error("Parse error in file %s, line %lu: Invalid mode \"%s\"", file_peek_path(), file_peek_line(), mode);
}
@ -2485,6 +2477,7 @@ parse_image(char *buff)
images[idx].mode |= ALLOW_VIEWPORT;
} else if (!BEG_STRCASECMP("auto", allow)) {
images[idx].mode |= ALLOW_AUTO;
} else if (!BEG_STRCASECMP("solid", allow)) {
} else {
print_error("Parse error in file %s, line %lu: Invalid mode \"%s\"", file_peek_path(), file_peek_line(), allow);
}

View File

@ -242,7 +242,7 @@ extern char *rs_pixmapScale;
extern char *rs_config_file;
extern unsigned int rs_line_space;
#ifndef NO_BOLDFONT
extern const char *rs_boldFont;
extern char *rs_boldFont;
#endif
#ifdef PRINTPIPE
extern char *rs_print_pipe;

View File

@ -29,6 +29,7 @@ static const char cvs_ident[] = "$Id$";
#include "mem.h"
#include "graphics.h"
#include "screen.h"
#include "scrollbar.h"
#include "options.h"
#ifdef PIXMAP_SUPPORT
# include "pixmap.h"
@ -3181,6 +3182,8 @@ debug_colors(void)
void xim_get_position(XPoint *pos)
{
pos->x = Col2Pixel(screen.col);
if (scrollbar_visible() && !(Options & Opt_scrollBar_right))
pos->x += scrollbar_trough_width();
pos->y = Height2Pixel(screen.row) + TermWin.font->ascent
+ TermWin.internalBorder;
}

View File

@ -297,11 +297,11 @@ lookup_key(XEvent * ev)
#ifdef KEYSYM_ATTRIBUTE
if (!(shft | ctrl) && KeySym_map[keysym - 0xFF00] != NULL) {
const unsigned char *kbuf;
const unsigned char *tmpbuf;
unsigned int len;
kbuf = (KeySym_map[keysym - 0xFF00]);
len = *kbuf++;
tmpbuf = (KeySym_map[keysym - 0xFF00]);
len = *tmpbuf++;
/* escape prefix */
if (meta
@ -313,7 +313,7 @@ lookup_key(XEvent * ev)
tt_write(&ch, 1);
}
tt_write(kbuf, len);
tt_write(tmpbuf, len);
LK_RET();
} else
#endif
@ -348,7 +348,7 @@ lookup_key(XEvent * ev)
#endif
case XK_Home:
len = strlen(strcpy(kbuf, KS_HOME));
len = strlen(strcpy(kbuf, KS_HOME));
break;
#ifdef XK_KP_Left

View File

@ -83,8 +83,8 @@ begin main
# not been set and Eterm cannot map the foreground color to one of the
# high-intensity colors (8-15).
font 0 fixed
font 1 6x10
font 2 6x13
font 1 5x7
font 2 6x10
font 3 8x13
font 4 9x15
# font bold 7x14

View File

@ -82,8 +82,8 @@ begin main
# not been set and Eterm cannot map the foreground color to one of the
# high-intensity colors (8-15).
font 0 fixed
font 1 6x10
font 2 6x13
font 1 5x7
font 2 6x10
font 3 8x13
font 4 9x15
# font bold 7x14

View File

@ -83,8 +83,8 @@ begin main
# not been set and Eterm cannot map the foreground color to one of the
# high-intensity colors (8-15).
font 0 fixed
font 1 6x10
font 2 6x13
font 1 5x7
font 2 6x10
font 3 8x13
font 4 9x15
# font bold 7x14

View File

@ -83,8 +83,8 @@ begin main
# not been set and Eterm cannot map the foreground color to one of the
# high-intensity colors (8-15).
font 0 fixed
font 1 6x10
font 2 6x13
font 1 5x7
font 2 6x10
font 3 8x13
font 4 9x15
# font bold 7x14

View File

@ -83,8 +83,8 @@ begin main
# not been set and Eterm cannot map the foreground color to one of the
# high-intensity colors (8-15).
font 0 fixed
font 1 6x10
font 2 6x13
font 1 5x7
font 2 6x10
font 3 8x13
font 4 9x15
# font bold 7x14

View File

@ -83,8 +83,8 @@ begin main
# not been set and Eterm cannot map the foreground color to one of the
# high-intensity colors (8-15).
font 0 fixed
font 1 6x10
font 2 6x13
font 1 5x7
font 2 6x10
font 3 8x13
font 4 9x15
# font bold 7x14

View File

@ -30,26 +30,22 @@
# define FALSE (0)
#endif
#ifndef TRUE
# define TRUE (!FALSE)
# define TRUE (1)
#endif
int
main(int argc, char **argv)
{
int scale = FALSE, trans = FALSE;
unsigned int i, pic = 0, tint = 0, shade = 0;
unsigned int i, pic = 0;
for (i = 1; i < argc; i++) {
if (strcasecmp(argv[i], "-scale") == 0) {
scale = TRUE;
} else if (strcasecmp(argv[i], "-trans") == 0) {
trans = TRUE;
} else if (strcasecmp(argv[i], "-tint") == 0 && i < argc - 1) {
tint = ++i;
} else if (strcasecmp(argv[i], "-shade") == 0 && i < argc - 1) {
shade = ++i;
} else if (strncasecmp(argv[i], "-h", 2) == 0) {
printf("Usage: %s [[-scale] file] [-trans] [-tint 0xACOLOR] [-shade nn%]\n", argv[0]);
printf("Usage: %s [[-scale] file] [-trans]\n", argv[0]);
return 0;
} else {
pic = i;
@ -58,16 +54,10 @@ main(int argc, char **argv)
if (pic && argv[pic]) {
printf("\033]6;0;0\a");
printf("\033]20;%s%s\a", argv[pic], scale ? ";100x100+0+0" : ";0");
printf("\033]20;%s%s\a", argv[pic], scale ? "@100x100+50+50:scale" : "@0x0+0+0:tile");
}
if (trans) {
printf("\033]6;0;1\a");
}
if (tint && argv[tint]) {
printf("\033]6;2;%s\a", argv[tint]);
}
if (shade && argv[shade]) {
printf("\033]6;1;%s\a", argv[shade]);
}
return 0;
}