Sun Jul 14 00:49:34 2002 Michael Jennings (mej)

Fixed bug pointed out by JC Wong <catalyst@gmx.net> where resizing a
window which had had transparency toggled on would reveal a black spot
at the bottom of the scrollbar.


SVN revision: 6340
This commit is contained in:
Michael Jennings 2002-07-14 04:55:26 +00:00
parent ba78b88603
commit b8f5e6e2a1
3 changed files with 17 additions and 5 deletions

View File

@ -4773,3 +4773,9 @@ Addition to last fix. Also, we're going to specify error messages
that *should* be shown and ignore others, not show all but a select
few. This helps with the status line issue.
----------------------------------------------------------------------
Sun Jul 14 00:49:34 2002 Michael Jennings (mej)
Fixed bug pointed out by JC Wong <catalyst@gmx.net> where resizing a
window which had had transparency toggled on would reveal a black spot
at the bottom of the scrollbar.
----------------------------------------------------------------------

View File

@ -1011,6 +1011,8 @@ render_simage(simage_t *simg, Window win, unsigned short width, unsigned short h
LIBAST_X_FREE_PIXMAP(buffer_pixmap);
buffer_pixmap = None;
}
/* Reset window shape mask. */
shaped_window_apply_mask(win, None);
#ifdef PIXMAP_SUPPORT
if ((images[which].mode & MODE_AUTO) && (images[which].mode & ALLOW_AUTO)) {
char buff[255];
@ -1213,7 +1215,7 @@ render_simage(simage_t *simg, Window win, unsigned short width, unsigned short h
simg->pmap->pixmap = LIBAST_X_CREATE_PIXMAP(width, height);
XCopyArea(Xdisplay, pixmap, simg->pmap->pixmap, gc, 0, 0, width, height, 0, 0);
IMLIB_FREE_PIXMAP(pixmap);
} else if (simg->pmap->mask != None) {
} else {
shaped_window_apply_mask(win, simg->pmap->mask);
}
if (simg->iml->bevel != NULL) {
@ -2099,8 +2101,7 @@ shaped_window_apply_mask(Drawable d, Pixmap mask)
static signed char have_shape = -1;
REQUIRE(d != None);
REQUIRE(mask != None);
D_PIXMAP(("shaped_window_apply_mask(d [0x%08x], mask [0x%08x]) called.\n", d, mask));
D_PIXMAP(("Applying mask 0x%08x to drawable 0x%08x\n", mask, d));
# ifdef HAVE_X_SHAPE_EXT
if (have_shape == -1) { /* Don't know yet. */
int unused;

View File

@ -700,6 +700,7 @@ scrollbar_init(int width, int height)
CWOverrideRedirect | CWBackPixel | CWBorderPixel | CWColormap, &Attributes);
XDefineCursor(Xdisplay, scrollbar.win, cursor);
XSelectInput(Xdisplay, scrollbar.win, mask);
XStoreName(Xdisplay, scrollbar.win, "Eterm Scrollbar");
D_SCROLLBAR(("Created scrollbar window 0x%08x\n", scrollbar.win));
/* Now the up arrow window. */
@ -707,6 +708,7 @@ scrollbar_init(int width, int height)
XCreateWindow(Xdisplay, scrollbar.win, scrollbar_get_shadow(), scrollbar_up_loc(), scrollbar_arrow_width(),
scrollbar_arrow_height(), 0, Xdepth, InputOutput, CopyFromParent, CWOverrideRedirect | CWColormap, &Attributes);
XSelectInput(Xdisplay, scrollbar.up_win, mask);
XStoreName(Xdisplay, scrollbar.up_win, "Eterm Scrollbar Up Arrow");
D_SCROLLBAR(("Created scrollbar up arrow window 0x%08x\n", scrollbar.up_win));
/* The down arrow window */
@ -714,6 +716,7 @@ scrollbar_init(int width, int height)
XCreateWindow(Xdisplay, scrollbar.win, scrollbar_get_shadow(), scrollbar_dn_loc(), scrollbar_arrow_width(),
scrollbar_arrow_height(), 0, Xdepth, InputOutput, CopyFromParent, CWOverrideRedirect | CWColormap, &Attributes);
XSelectInput(Xdisplay, scrollbar.dn_win, mask);
XStoreName(Xdisplay, scrollbar.up_win, "Eterm Scrollbar Down Arrow");
D_SCROLLBAR(("Created scrollbar down arrow window 0x%08x\n", scrollbar.dn_win));
/* The anchor window */
@ -722,6 +725,7 @@ scrollbar_init(int width, int height)
scrollbar_anchor_height(), 0, Xdepth, InputOutput, CopyFromParent, CWOverrideRedirect | CWSaveUnder | CWColormap, &Attributes);
XSelectInput(Xdisplay, scrollbar.sa_win, mask);
XMapWindow(Xdisplay, scrollbar.sa_win);
XStoreName(Xdisplay, scrollbar.up_win, "Eterm Scrollbar Anchor");
D_SCROLLBAR(("Created scrollbar anchor window 0x%08x\n", scrollbar.sa_win));
if (scrollbar_get_type() != SCROLLBAR_XTERM) {
@ -813,9 +817,10 @@ scrollbar_resize(int width, int height)
D_SCROLLBAR(("scrollbar_resize(%d, %d)\n", width, height));
scrollbar_calc_size(width, height);
D_SCROLLBAR((" -> XMoveResizeWindow(Xdisplay, 0x%08x, %d, y, %d, %d)\n", scrollbar.win,
((Options & Opt_scrollbar_right) ? (width - scrollbar_trough_width()) : (0)), scrollbar_trough_width(), scrollbar.win_height));
((Options & Opt_scrollbar_right) ? (width - scrollbar_trough_width()) : (0)),
scrollbar_trough_width(), scrollbar_trough_height()));
XMoveResizeWindow(Xdisplay, scrollbar.win, ((Options & Opt_scrollbar_right) ? (width - scrollbar_trough_width()) : (0)),
bbar_calc_docked_height(BBAR_DOCKED_TOP), scrollbar_trough_width(), scrollbar.win_height);
bbar_calc_docked_height(BBAR_DOCKED_TOP), scrollbar_trough_width(), scrollbar_trough_height());
scrollbar_draw_trough(IMAGE_STATE_CURRENT, MODE_MASK);
scrollbar_reposition_and_draw(MODE_MASK);
scrollbar.init = 0;