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.306 by ayin, Mon Feb 18 09:58:04 2008 UTC vs.
Revision 1.310 by root, Wed Feb 27 01:05:55 2008 UTC

235 selection_clear (); 235 selection_clear ();
236 236
237#ifdef USE_XIM 237#ifdef USE_XIM
238 im_destroy (); 238 im_destroy ();
239#endif 239#endif
240#ifdef XTERM_SCROLLBAR 240 scrollBar.destroy ();
241 if (xscrollbarGC) XFreeGC (dpy, xscrollbarGC);
242 if (ShadowGC) XFreeGC (dpy, ShadowGC);
243#endif
244#ifdef PLAIN_SCROLLBAR
245 if (pscrollbarGC) XFreeGC (dpy, pscrollbarGC);
246#endif
247#ifdef NEXT_SCROLLBAR
248 if (blackGC) XFreeGC (dpy, blackGC);
249 if (whiteGC) XFreeGC (dpy, whiteGC);
250 if (grayGC) XFreeGC (dpy, grayGC);
251 if (darkGC) XFreeGC (dpy, darkGC);
252 if (stippleGC) XFreeGC (dpy, stippleGC);
253 if (dimple) XFreePixmap (dpy, dimple);
254 if (upArrow) XFreePixmap (dpy, upArrow);
255 if (downArrow) XFreePixmap (dpy, downArrow);
256 if (upArrowHi) XFreePixmap (dpy, upArrowHi);
257 if (downArrowHi) XFreePixmap (dpy, downArrowHi);
258#endif
259#ifdef RXVT_SCROLLBAR
260 if (topShadowGC) XFreeGC (dpy, topShadowGC);
261 if (botShadowGC) XFreeGC (dpy, botShadowGC);
262 if (scrollbarGC) XFreeGC (dpy, scrollbarGC);
263#endif
264 if (gc) XFreeGC (dpy, gc); 241 if (gc) XFreeGC (dpy, gc);
265 242
266 delete drawable; 243 delete drawable;
267 // destroy all windows 244 // destroy all windows
268 if (parent[0]) 245 if (parent[0])
545 if (rs[Rs_geometry]) 522 if (rs[Rs_geometry])
546 flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h); 523 flags = XParseGeometry (rs[Rs_geometry], &x, &y, &w, &h);
547 524
548 if (flags & WidthValue) 525 if (flags & WidthValue)
549 { 526 {
527 if (!w)
528 rxvt_fatal ("illegal window geometry (width and height must be non-zero), aborting.\n");
529
550 ncol = clamp (w, 0, std::numeric_limits<int16_t>::max ()); 530 ncol = clamp (w, 1, std::numeric_limits<int16_t>::max ());
551 szHint.flags |= USSize; 531 szHint.flags |= USSize;
552 } 532 }
553 533
554 if (flags & HeightValue) 534 if (flags & HeightValue)
555 { 535 {
536 if (!h)
537 rxvt_fatal ("illegal window geometry (width and height must be non-zero), aborting.\n");
538
556 nrow = clamp (h, 0, std::numeric_limits<int16_t>::max ()); 539 nrow = clamp (h, 1, std::numeric_limits<int16_t>::max ());
557 szHint.flags |= USSize; 540 szHint.flags |= USSize;
558 } 541 }
559 542
560 if (flags & XValue) 543 if (flags & XValue)
561 { 544 {
978 fix_screen = ncol != prev_ncol || nrow != prev_nrow; 961 fix_screen = ncol != prev_ncol || nrow != prev_nrow;
979 962
980 if (fix_screen || newwidth != old_width || newheight != old_height) 963 if (fix_screen || newwidth != old_width || newheight != old_height)
981 { 964 {
982 if (scrollBar.state) 965 if (scrollBar.state)
983 resize_scrollbar (); 966 scrollBar.resize ();
984 967
985 XMoveResizeWindow (dpy, vt, 968 XMoveResizeWindow (dpy, vt,
986 window_vt_x, window_vt_y, 969 window_vt_x, window_vt_y,
987 width, height); 970 width, height);
988 971

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines