Make pix_colors_{focused,unfocused} arrays non dynamic.
authorayin <ayin>
Fri, 28 Dec 2007 14:57:04 +0000 (14:57 +0000)
committerayin <ayin>
Fri, 28 Dec 2007 14:57:04 +0000 (14:57 +0000)
src/init.C
src/main.C
src/rxvt.h

index e280a6c..ac0e181 100644 (file)
@@ -283,11 +283,7 @@ const char *const def_colorName[] =
 void
 rxvt_term::init_vars ()
 {
-  pix_colors           = //
-  pix_colors_focused   = new rxvt_color [TOTAL_COLORS];
-#ifdef OFF_FOCUS_FADING
-  pix_colors_unfocused = new rxvt_color [TOTAL_COLORS];
-#endif
+  pix_colors = pix_colors_focused;
 
   MEvent.time = CurrentTime;
   MEvent.button = AnyButton;
index c04bb80..1601292 100644 (file)
@@ -278,11 +278,6 @@ rxvt_term::~rxvt_term ()
       clear ();
     }
 
-  delete [] pix_colors_focused;
-#if OFF_FOCUS_FADING
-  delete [] pix_colors_unfocused;
-#endif
-
 #ifdef HAVE_BG_PIXMAP
   bgPixmap.destroy ();
 #endif
index 356471c..1b26ef7 100644 (file)
@@ -1054,10 +1054,6 @@ struct rxvt_vars : TermWin_t {
   uint8_t         options[(Opt_count + 7) >> 3];
   XSizeHints      szHint;
   rxvt_color     *pix_colors;
-  rxvt_color     *pix_colors_focused;
-#ifdef OFF_FOCUS_FADING
-  rxvt_color     *pix_colors_unfocused;
-#endif
   Cursor          TermWin_cursor;       /* cursor for vt window */
   int             sb_shadow;    /* scrollbar shadow width                    */
   int             numlock_state;
@@ -1068,6 +1064,10 @@ struct rxvt_vars : TermWin_t {
   screen_t        screen;
   screen_t        swap;
   selection_t     selection;
+  rxvt_color      pix_colors_focused[TOTAL_COLORS];
+#ifdef OFF_FOCUS_FADING
+  rxvt_color      pix_colors_unfocused[TOTAL_COLORS];
+#endif
 };
 
 struct rxvt_term : zero_initialized, rxvt_vars, rxvt_screen {