@@ -1826,7 +1826,7 @@ static char *style_parse_icon_box_style(
18261826
18271827 /* otherwise try to parse the icon box */
18281828 IconBoxes = fxcalloc (1 , sizeof (icon_boxes ));
1829- IconBoxes -> IconScreen = "global" ;
1829+ IconBoxes -> IconScreen = fxstrdup ( "global" ) ;
18301830 /* init grid x */
18311831 IconBoxes -> IconGrid [0 ] = 3 ;
18321832 /* init grid y */
@@ -1838,7 +1838,10 @@ static char *style_parse_icon_box_style(
18381838 is_screen_given = True ;
18391839 option = PeekToken (rest , & rest ); /* skip screen */
18401840 option = PeekToken (rest , & rest ); /* get the screen spec */
1841- IconBoxes -> IconScreen = option ;
1841+ free (IconBoxes -> IconScreen );
1842+ IconBoxes -> IconScreen = fxstrdup (option );
1843+
1844+ fvwm_debug (__func__ , "screen set: %s" , option );
18421845 }
18431846
18441847 /* try for 4 numbers x y x y */
@@ -1892,16 +1895,19 @@ static char *style_parse_icon_box_style(
18921895 option = PeekToken (rest , NULL );
18931896 if (!option )
18941897 {
1898+ fvwm_debug (__func__ , "No option set, returning: <<%s>>" , rest );
18951899 return rest ;
18961900 }
18971901 l = strlen (option );
18981902 if (l > 0 && l < 24 )
18991903 {
19001904 char * scr ;
19011905
1906+ fvwm_debug (__func__ , "option 1: %s" , option );
19021907 /* advance */
19031908 option = PeekToken (rest , & rest );
19041909 /* if word found, not too long */
1910+ fvwm_debug (__func__ , "option 2: %s" , option );
19051911 geom_flags = FScreenParseGeometryWithScreen (
19061912 option , & IconBoxes -> IconBox [0 ],
19071913 & IconBoxes -> IconBox [1 ], (unsigned int * )& width ,
@@ -4810,12 +4816,7 @@ void free_icon_boxes(icon_boxes *ib)
48104816 temp = ib -> next ;
48114817 if (ib -> use_count == 0 )
48124818 {
4813- if (ib -> do_free_screen )
4814- {
4815- free (ib -> IconScreen );
4816- ib -> IconScreen = NULL ;
4817- ib -> do_free_screen = 0 ;
4818- }
4819+ free (ib -> IconScreen );
48194820 free (ib );
48204821 }
48214822 else
0 commit comments