mouse: fix uninit var
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
c0796d2259
commit
723299ff5f
4
mouse.c
4
mouse.c
|
@ -769,7 +769,7 @@ mouse_client_resize_tiled(client_t *c)
|
||||||
/* for each motion event */
|
/* for each motion event */
|
||||||
while(mouse_track_mouse_drag(&mouse_x, &mouse_y))
|
while(mouse_track_mouse_drag(&mouse_x, &mouse_y))
|
||||||
{
|
{
|
||||||
double mwfact, fact_x, fact_y;
|
double mwfact = 0, fact_x, fact_y;
|
||||||
|
|
||||||
/* calculate new master / rest ratio */
|
/* calculate new master / rest ratio */
|
||||||
fact_x = (double) (mouse_x - area.x) / area.width;
|
fact_x = (double) (mouse_x - area.x) / area.width;
|
||||||
|
@ -785,7 +785,7 @@ mouse_client_resize_tiled(client_t *c)
|
||||||
mwfact = 1. - fact_y;
|
mwfact = 1. - fact_y;
|
||||||
|
|
||||||
/* keep mwfact within reasonable bounds */
|
/* keep mwfact within reasonable bounds */
|
||||||
mwfact = MIN( MAX( 0.01, mwfact), 0.99 );
|
mwfact = MIN(MAX( 0.01, mwfact), 0.99);
|
||||||
|
|
||||||
/* refresh layout */
|
/* refresh layout */
|
||||||
if(fabs(tag->mwfact - mwfact) >= 0.01)
|
if(fabs(tag->mwfact - mwfact) >= 0.01)
|
||||||
|
|
Loading…
Reference in New Issue