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.304 by ayin, Wed Feb 6 12:05:35 2008 UTC vs.
Revision 1.308 by ayin, Tue Feb 19 13:01:32 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])
525 */ 502 */
526void 503void
527rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight) 504rxvt_term::window_calc (unsigned int newwidth, unsigned int newheight)
528{ 505{
529 short recalc_x, recalc_y; 506 short recalc_x, recalc_y;
530 int x, y, sb_w, flags; 507 int x, y, flags;
531 unsigned int w, h; 508 unsigned int w, h;
532 unsigned int max_width, max_height; 509 unsigned int max_width, max_height;
533 510
534 szHint.flags = PMinSize | PResizeInc | PBaseSize | PWinGravity; 511 szHint.flags = PMinSize | PResizeInc | PBaseSize | PWinGravity;
535 szHint.win_gravity = NorthWestGravity; 512 szHint.win_gravity = NorthWestGravity;
592 max_width = MAX_COLS * fwidth; 569 max_width = MAX_COLS * fwidth;
593 max_height = MAX_ROWS * fheight; 570 max_height = MAX_ROWS * fheight;
594 571
595 szHint.base_width = szHint.base_height = 2 * int_bwidth; 572 szHint.base_width = szHint.base_height = 2 * int_bwidth;
596 573
597 sb_w = 0;
598 window_vt_x = window_vt_y = int_bwidth; 574 window_vt_x = window_vt_y = int_bwidth;
599 575
600 if (scrollBar.state) 576 if (scrollBar.state)
601 { 577 {
602 sb_w = scrollbar_TotalWidth (); 578 int sb_w = scrollBar.total_width ();
603 szHint.base_width += sb_w; 579 szHint.base_width += sb_w;
604 580
605 if (!option (Opt_scrollBar_right)) 581 if (!option (Opt_scrollBar_right))
606 window_vt_x += sb_w; 582 window_vt_x += sb_w;
607 } 583 }
630 else 606 else
631 { 607 {
632 min_it (height, max_height); 608 min_it (height, max_height);
633 szHint.height = szHint.base_height + height; 609 szHint.height = szHint.base_height + height;
634 } 610 }
635
636 if (scrollBar.state && option (Opt_scrollBar_right))
637 window_sb_x = szHint.width - sb_w;
638 611
639 if (recalc_x) 612 if (recalc_x)
640 szHint.x += DisplayWidth (dpy, display->screen) - szHint.width - 2 * ext_bwidth; 613 szHint.x += DisplayWidth (dpy, display->screen) - szHint.width - 2 * ext_bwidth;
641 614
642 if (recalc_y) 615 if (recalc_y)
982 fix_screen = ncol != prev_ncol || nrow != prev_nrow; 955 fix_screen = ncol != prev_ncol || nrow != prev_nrow;
983 956
984 if (fix_screen || newwidth != old_width || newheight != old_height) 957 if (fix_screen || newwidth != old_width || newheight != old_height)
985 { 958 {
986 if (scrollBar.state) 959 if (scrollBar.state)
987 { 960 scrollBar.resize ();
988 XMoveResizeWindow (dpy, scrollBar.win,
989 window_sb_x, 0,
990 scrollbar_TotalWidth (), szHint.height);
991 resize_scrollbar ();
992 }
993 961
994 XMoveResizeWindow (dpy, vt, 962 XMoveResizeWindow (dpy, vt,
995 window_vt_x, window_vt_y, 963 window_vt_x, window_vt_y,
996 width, height); 964 width, height);
997 965

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines