Dear Richard,
I encountered an integer overflow error in ctwm when using it on a
rather large 30" display (nice display, though!). The error is in
the calculation of the OpaqueResizeThreshold boundary. For large
root window sizes, Scr->rootw * Scr->rooth * Scr->OpaqueResizeThreshold
overflows a 32 bit signed integer. This could be solved in a number of
ways; I took the simple step of balancing the equation so that neither
side multiplies three numbers together.
ctwm-3.8a, file menus.c, lines 2322 and following:
if (tmp_win->OpaqueResize) {
int sw, ss;
sw = tmp_win->frame_width * tmp_win->frame_height;
ss = Scr->rootw * Scr->rooth;
if ((sw / Scr->OpaqueResizeThreshold) > (ss / 100))
Scr->OpaqueResize = FALSE;
else
Scr->OpaqueResize = TRUE;
}
Making sw and ss (unsigned int) would also give some extra margin.
Thanks for maintaining ctwm!
By the way, I've been playing around recently with the "freetype"
font rendering in X11. Would you like a ctwm patch for antialiased
freetype fonts?
Regards,
Tim
+--------------------------------+-------------------------------------+
| Dr. R. Timothy Edwards (Tim) | email: [EMAIL PROTECTED] |
| MultiGiG, Inc. | web: http://www.multigig.com |
| 100 Enterprise Way, Suite A-3 | phone: (831) 621-3283 |
| Scotts Valley, CA 95066 | cell: (240) 401-0616 |
+--------------------------------+-------------------------------------+