ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/main.C
(Generate patch)

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.309 by root, Wed Feb 27 01:02:33 2008 UTC vs.
Revision 1.311 by root, Tue Nov 4 13:28:40 2008 UTC

227 delete fontset[0]; 227 delete fontset[0];
228 228
229#ifdef HAVE_BG_PIXMAP 229#ifdef HAVE_BG_PIXMAP
230 bgPixmap.destroy (); 230 bgPixmap.destroy ();
231#endif 231#endif
232#ifdef HAVE_AFTERIMAGE
233 if (asv)
234 destroy_asvisual (asv, 0);
235 if (asimman)
236 destroy_image_manager (asimman, 0);
237#endif
232 238
233 if (display) 239 if (display)
234 { 240 {
235 selection_clear (); 241 selection_clear ();
236 242
522 if (rs[Rs_geometry]) 528 if (rs[Rs_geometry])
523 flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h); 529 flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h);
524 530
525 if (flags & WidthValue) 531 if (flags & WidthValue)
526 { 532 {
533 if (!w)
534 rxvt_fatal ("illegal window geometry (width and height must be non-zero), aborting.\n");
535
527 ncol = clamp (w, 0, std::numeric_limits<int16_t>::max ()); 536 ncol = clamp (w, 1, std::numeric_limits<int16_t>::max ());
528 szHint.flags |= USSize; 537 szHint.flags |= USSize;
529 } 538 }
530 539
531 if (flags & HeightValue) 540 if (flags & HeightValue)
532 { 541 {
542 if (!h)
543 rxvt_fatal ("illegal window geometry (width and height must be non-zero), aborting.\n");
544
533 nrow = clamp (h, 0, std::numeric_limits<int16_t>::max ()); 545 nrow = clamp (h, 1, std::numeric_limits<int16_t>::max ());
534 szHint.flags |= USSize; 546 szHint.flags |= USSize;
535 } 547 }
536 548
537 if (flags & XValue) 549 if (flags & XValue)
538 { 550 {
559 szHint.win_gravity = SouthEastGravity; 571 szHint.win_gravity = SouthEastGravity;
560 else 572 else
561 szHint.win_gravity = SouthWestGravity; 573 szHint.win_gravity = SouthWestGravity;
562 } 574 }
563 } 575 }
564
565 if (!szHint.width || !szHint.height)
566 rxvt_fatal ("window width or height must not be zero, aborting.\n");
567 } 576 }
568 577
569 /* TODO: BOUNDS */ 578 /* TODO: BOUNDS */
570 width = ncol * fwidth; 579 width = ncol * fwidth;
571 height = nrow * fheight; 580 height = nrow * fheight;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines