Mon Apr 17 22:25:27 PDT 2000 Michael Jennings <mej@eterm.org>
I fixed the problem reported by Joakim Bodin <bodin@dreamhosted.com> with spawned processes. Also fixed Esetroot as reported by Wayne Johnson <bigman1@alltel.net>. Support for buttons higher than 5 was also added to the action bindings code for those (like me) with IntelliMouse Explorers and XFree86 4.0. :-) SVN revision: 2494
This commit is contained in:
parent
84e12faee3
commit
1e9bf450c4
11
ChangeLog
11
ChangeLog
|
@ -3488,3 +3488,14 @@ Thu Apr 13 21:15:03 PDT 2000 Michael Jennings <mej@eterm.org>
|
|||
Fixed an image loading problem.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Mon Apr 17 22:25:27 PDT 2000 Michael Jennings <mej@eterm.org>
|
||||
|
||||
I fixed the problem reported by Joakim Bodin <bodin@dreamhosted.com>
|
||||
with spawned processes. Also fixed Esetroot as reported by Wayne
|
||||
Johnson <bigman1@alltel.net>.
|
||||
|
||||
Support for buttons higher than 5 was also added to the action
|
||||
bindings code for those (like me) with IntelliMouse Explorers and
|
||||
XFree86 4.0. :-)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
|
|
|
@ -83,6 +83,7 @@ action_dispatch(event_t *ev, KeySym keysym) {
|
|||
unsigned int m = (AltMask | MetaMask | NumLockMask);
|
||||
|
||||
ASSERT(ev != NULL);
|
||||
D_ACTIONS(("Event %8p: Button %d, Keysym 0x%08x, Key State 0x%08x\n", ev, ev->xbutton.button, keysym, ev->xkey.state));
|
||||
for (action = action_list; action; action = action->next) {
|
||||
D_ACTIONS(("Checking action. mod == 0x%08x, button == %d, keysym == 0x%08x\n", action->mod, action->button, action->keysym));
|
||||
if (ev->xany.type == ButtonPress) {
|
||||
|
|
|
@ -1028,7 +1028,7 @@ handle_child_signal(int sig)
|
|||
/* If the child that exited is the command we spawned, or if the
|
||||
child exited before fork() returned in the parent, it must be
|
||||
our immediate child that exited. We exit gracefully. */
|
||||
if (pid == cmd_pid || cmd_pid == -1) {
|
||||
if (pid == cmd_pid && cmd_pid != -1) {
|
||||
if (Options & Opt_pause) {
|
||||
const char *message = "\r\nPress any key to exit " APL_NAME "....";
|
||||
|
||||
|
@ -2151,7 +2151,7 @@ run_command(char *argv[])
|
|||
my_euid = my_ruid;
|
||||
my_egid = my_rgid;
|
||||
|
||||
/* command interpreter path */
|
||||
usleep(10); /* Attempt to force a context switch so that the parent runs before us. */
|
||||
D_CMD(("[%d] About to spawn shell\n", getpid()));
|
||||
if (chdir(initial_dir)) {
|
||||
print_warning("Unable to chdir to \"%s\" -- %s\n", initial_dir, strerror(errno));
|
||||
|
|
|
@ -779,8 +779,8 @@ xerror_handler(Display * display, XErrorEvent * event)
|
|||
|
||||
strcpy(err_string, "");
|
||||
XGetErrorText(display, event->error_code, err_string, sizeof(err_string));
|
||||
print_error("XError in function %s (request %d.%d): %s (error %d)", request_code_to_name(event->request_code),
|
||||
event->request_code, event->minor_code, err_string, event->error_code);
|
||||
print_error("XError in function %s, resource 0x%08x (request %d.%d): %s (error %d)", request_code_to_name(event->request_code),
|
||||
(int) event->resourceid, event->request_code, event->minor_code, err_string, event->error_code);
|
||||
#if DEBUG > DEBUG_X11
|
||||
if (debug_level >= DEBUG_X11) {
|
||||
dump_stack_trace();
|
||||
|
|
|
@ -2914,14 +2914,7 @@ parse_actions(char *buff, void *state)
|
|||
} else if (!BEG_STRCASECMP(str, "mod5")) {
|
||||
mod |= MOD_MOD5;
|
||||
} else if (!BEG_STRCASECMP(str, "button")) {
|
||||
switch (*(str+6)) {
|
||||
case '1': button = Button1; break;
|
||||
case '2': button = Button2; break;
|
||||
case '3': button = Button3; break;
|
||||
case '4': button = Button4; break;
|
||||
case '5': button = Button5; break;
|
||||
default: break;
|
||||
}
|
||||
button = *(str + 6) - '0';
|
||||
} else if (isdigit(*str)) {
|
||||
keysym = (KeySym) strtoul(str, (char **) NULL, 0);
|
||||
} else {
|
||||
|
|
16
src/pixmap.c
16
src/pixmap.c
|
@ -571,6 +571,12 @@ create_viewport_pixmap(simage_t *simg, Drawable d, int x, int y, unsigned short
|
|||
D_PIXMAP(("Tiling image at %dx%d\n", xsize, ysize));
|
||||
imlib_render_pixmaps_for_whole_image(&viewport_pixmap, &mask, 0);
|
||||
}
|
||||
if (viewport_pixmap == None) {
|
||||
print_error("Delayed image load failure for \"%s\". Using solid color mode.", imlib_image_get_filename());
|
||||
image_set_mode(image_bg, MODE_SOLID);
|
||||
reset_simage(simg, RESET_ALL_SIMG);
|
||||
return None;
|
||||
}
|
||||
D_PIXMAP(("Created viewport_pixmap == 0x%08x\n", viewport_pixmap));
|
||||
} else {
|
||||
XGetGeometry(Xdisplay, viewport_pixmap, &dummy, &px, &py, &pw, &ph, &pb, &pd);
|
||||
|
@ -725,7 +731,11 @@ paste_simage(simage_t *simg, unsigned char which, Drawable d, unsigned short x,
|
|||
} else {
|
||||
imlib_render_pixmaps_for_whole_image_at_size(&pmap, &mask, 0, w, h);
|
||||
}
|
||||
ASSERT(pmap != None);
|
||||
if (pmap == None) {
|
||||
print_error("Delayed image load failure for \"%s\".", imlib_image_get_filename());
|
||||
reset_simage(simg, RESET_ALL_SIMG);
|
||||
return;
|
||||
}
|
||||
gc = XCreateGC(Xdisplay, d, 0, NULL);
|
||||
if (mask) {
|
||||
XSetClipMask(Xdisplay, gc, mask);
|
||||
|
@ -1083,6 +1093,10 @@ render_simage(simage_t * simg, Window win, unsigned short width, unsigned short
|
|||
and handle exposes by copying from simg->pmap->pixmap. */
|
||||
XSetWindowBackgroundPixmap(Xdisplay, win, simg->pmap->pixmap);
|
||||
}
|
||||
} else {
|
||||
print_error("Delayed image load failure for \"%s\". Using solid color mode.", imlib_image_get_filename());
|
||||
image_set_mode(which, MODE_SOLID);
|
||||
reset_simage(simg, RESET_ALL_SIMG);
|
||||
}
|
||||
} else {
|
||||
image_set_mode(which, MODE_SOLID);
|
||||
|
|
|
@ -99,7 +99,6 @@ system_wait(char *command)
|
|||
|
||||
D_OPTIONS(("system_wait(%s) called.\n", command));
|
||||
|
||||
old_handler = signal(SIGCHLD, dummy_handler);
|
||||
if (!(pid = fork())) {
|
||||
setreuid(my_ruid, my_ruid);
|
||||
setregid(my_rgid, my_rgid);
|
||||
|
@ -120,7 +119,6 @@ system_no_wait(char *command)
|
|||
|
||||
D_OPTIONS(("system_no_wait(%s) called.\n", command));
|
||||
|
||||
old_handler = signal(SIGCHLD, dummy_handler);
|
||||
if (!(pid = fork())) {
|
||||
setreuid(my_ruid, my_ruid);
|
||||
setregid(my_rgid, my_rgid);
|
||||
|
|
|
@ -97,7 +97,7 @@ main(int argc, char *argv[])
|
|||
char *displayname = NULL;
|
||||
char *fname = NULL;
|
||||
Imlib_Image im;
|
||||
Pixmap p, temp_pmap;
|
||||
Pixmap p, temp_pmap, m;
|
||||
register unsigned char i;
|
||||
GC gc;
|
||||
XGCValues gcv;
|
||||
|
@ -166,7 +166,7 @@ main(int argc, char *argv[])
|
|||
}
|
||||
imlib_context_set_display(Xdisplay);
|
||||
imlib_context_set_visual(DefaultVisual(Xdisplay, DefaultScreen(Xdisplay)));
|
||||
im = imlib_load_image(fname);
|
||||
im = imlib_load_image_immediately(fname);
|
||||
if (im == NULL) {
|
||||
fprintf(stderr, "%s: Unable to load image file \"%s\".\n", *argv, fname);
|
||||
exit(1);
|
||||
|
@ -214,7 +214,8 @@ main(int argc, char *argv[])
|
|||
imlib_context_set_anti_alias(1);
|
||||
imlib_context_set_dither(1);
|
||||
imlib_context_set_blend(0);
|
||||
imlib_render_pixmaps_for_whole_image_at_size(&temp_pmap, NULL, 0, w, h);
|
||||
imlib_context_set_drawable(Xroot);
|
||||
imlib_render_pixmaps_for_whole_image_at_size(&temp_pmap, &m, 0, w, h);
|
||||
if (debug) {
|
||||
fprintf(stderr, "%s:%d: Rendered at %dx%d onto pixmap 0x%08x\n", __FILE__, __LINE__, w, h, (unsigned int) temp_pmap);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue