layout.c
changeset 934 1e8e98b7544d
parent 933 f7619f63380a
child 935 2032654a0c6d
equal deleted inserted replaced
933:f7619f63380a 934:1e8e98b7544d
    10 
    10 
    11 static double hratio = HRATIO;
    11 static double hratio = HRATIO;
    12 static double vratio = VRATIO;
    12 static double vratio = VRATIO;
    13 static unsigned int nlayouts = 0;
    13 static unsigned int nlayouts = 0;
    14 static unsigned int nmaster = NMASTER;
    14 static unsigned int nmaster = NMASTER;
    15 
       
    16 static void
       
    17 incratio(const char *arg, double *ratio, double def) {
       
    18 	double delta;
       
    19 
       
    20 	if(lt->arrange != tile)
       
    21 		return;
       
    22 	if(!arg)
       
    23 		*ratio = def;
       
    24 	else {
       
    25 		if(1 == sscanf(arg, "%lf", &delta)) {
       
    26 			if(delta + (*ratio) < .1 || delta + (*ratio) > 1.9)
       
    27 				return;
       
    28 			*ratio += delta;
       
    29 		}
       
    30 	}
       
    31 	lt->arrange();
       
    32 }
       
    33 
    15 
    34 static double /* simple pow() */
    16 static double /* simple pow() */
    35 spow(double x, double y)
    17 spow(double x, double y)
    36 {
    18 {
    37 	if(y == 0)
    19 	if(y == 0)
   108 	restack();
    90 	restack();
   109 }
    91 }
   110 
    92 
   111 LAYOUTS
    93 LAYOUTS
   112 
    94 
       
    95 static void
       
    96 incratio(const char *arg, double *ratio, double def) {
       
    97 	double delta;
       
    98 
       
    99 	if(lt->arrange != tile)
       
   100 		return;
       
   101 	if(!arg)
       
   102 		*ratio = def;
       
   103 	else {
       
   104 		if(1 == sscanf(arg, "%lf", &delta)) {
       
   105 			if(delta + (*ratio) < .1 || delta + (*ratio) > 1.9)
       
   106 				return;
       
   107 			*ratio += delta;
       
   108 		}
       
   109 	}
       
   110 	lt->arrange();
       
   111 }
       
   112 
   113 /* extern */
   113 /* extern */
   114 
   114 
   115 void
   115 void
   116 floating(void) {
   116 floating(void) {
   117 	Client *c;
   117 	Client *c;