[mouse] Fix uninitialized vars

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-03-28 13:22:26 +01:00
parent 18117e8495
commit ffe6186fa4
1 changed files with 43 additions and 38 deletions

27
mouse.c
View File

@ -161,10 +161,10 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused)))
ocy = geometry.y;
c->ismax = False;
if(c->isfloating || layout->arrange == layout_floating)
{
style = globalconf.screens[c->screen].styles.focus;
if(c->isfloating || layout->arrange == layout_floating)
{
sw = simplewindow_new(globalconf.display, c->phys_screen, 0, 0,
draw_textwidth(globalconf.display,
globalconf.screens[c->screen].styles.focus.font,
@ -257,21 +257,23 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
Client *c = globalconf.focus->client;
Tag **curtags = tags_get_current(screen);
Layout *layout = curtags[0]->layout;
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry;
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL };
double mwfact;
SimpleWindow *sw = NULL;
DrawCtx *ctx = NULL;
style_t style;
/* only handle floating and tiled layouts */
if(c && !c->isfixed)
{
if(!c || c->isfixed)
return;
style = globalconf.screens[c->screen].styles.focus;
if(layout->arrange == layout_floating || c->isfloating)
{
ocx = c->geometry.x;
ocy = c->geometry.y;
c->ismax = False;
style = globalconf.screens[c->screen].styles.focus;
sw = simplewindow_new(globalconf.display, c->phys_screen, 0, 0,
draw_textwidth(globalconf.display,
@ -301,7 +303,6 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
globalconf.screens[c->screen].statusbar,
&globalconf.screens[c->screen].padding);
}
}
else
return;
@ -313,13 +314,17 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused)))
return;
if(curtags[0]->layout->arrange == layout_tileleft)
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0, 0, c->geometry.height + c->border - 1);
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0, 0,
c->geometry.height + c->border - 1);
else if(curtags[0]->layout->arrange == layout_tilebottom)
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0, c->geometry.width + c->border - 1, c->geometry.height + c->border - 1);
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0,
c->geometry.width + c->border - 1, c->geometry.height + c->border - 1);
else if(curtags[0]->layout->arrange == layout_tiletop)
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0, c->geometry.width + c->border - 1, 0);
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0,
c->geometry.width + c->border - 1, 0);
else
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0, c->geometry.width + c->border - 1, c->geometry.height + c->border - 1);
XWarpPointer(globalconf.display, None, c->win, 0, 0, 0, 0,
c->geometry.width + c->border - 1, c->geometry.height + c->border - 1);
for(;;)
{