resizemouse() is now an uicb function
This commit is contained in:
parent
f72c1bb54c
commit
69c235280d
1
config.c
1
config.c
|
@ -104,6 +104,7 @@ const NameFuncLink UicbList[] = {
|
||||||
{"setstatustext", uicb_setstatustext},
|
{"setstatustext", uicb_setstatustext},
|
||||||
/* event.c */
|
/* event.c */
|
||||||
{"movemouse", uicb_movemouse},
|
{"movemouse", uicb_movemouse},
|
||||||
|
{"resizemouse", uicb_resizemouse},
|
||||||
{NULL, NULL}
|
{NULL, NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
24
event.c
24
event.c
|
@ -102,11 +102,21 @@ uicb_movemouse(awesome_config *awesomeconf, const char *arg __attribute__ ((unus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
void
|
||||||
resizemouse(Client * c, awesome_config *awesomeconf)
|
uicb_resizemouse(awesome_config *awesomeconf, const char *arg __attribute__ ((unused)))
|
||||||
{
|
{
|
||||||
int ocx, ocy, nw, nh;
|
int ocx, ocy, nw, nh;
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
|
Client *c = get_current_tag(awesomeconf->tags, awesomeconf->ntags)->client_sel;
|
||||||
|
|
||||||
|
if(!c)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if((get_current_layout(awesomeconf->tags, awesomeconf->ntags)->arrange != layout_floating)
|
||||||
|
&& !c->isfloating)
|
||||||
|
uicb_togglefloating(awesomeconf, "DUMMY");
|
||||||
|
else
|
||||||
|
restack(&awesomeconf[c->screen]);
|
||||||
|
|
||||||
ocx = c->x;
|
ocx = c->x;
|
||||||
ocy = c->y;
|
ocy = c->y;
|
||||||
|
@ -236,15 +246,7 @@ handle_event_buttonpress(XEvent * e, awesome_config *awesomeconf)
|
||||||
uicb_zoom(&awesomeconf[c->screen], NULL);
|
uicb_zoom(&awesomeconf[c->screen], NULL);
|
||||||
}
|
}
|
||||||
else if(ev->button == Button3)
|
else if(ev->button == Button3)
|
||||||
{
|
uicb_resizemouse(&awesomeconf[c->screen], NULL);
|
||||||
if((get_current_layout(awesomeconf[c->screen].tags,
|
|
||||||
awesomeconf[c->screen].ntags)->arrange != layout_floating)
|
|
||||||
&& !c->isfloating)
|
|
||||||
uicb_togglefloating(&awesomeconf[c->screen], "DUMMY");
|
|
||||||
else
|
|
||||||
restack(&awesomeconf[c->screen]);
|
|
||||||
resizemouse(c, awesomeconf);
|
|
||||||
}
|
|
||||||
else if(ev->button == Button4)
|
else if(ev->button == Button4)
|
||||||
uicb_settrans(&awesomeconf[c->screen], "+5");
|
uicb_settrans(&awesomeconf[c->screen], "+5");
|
||||||
else if(ev->button == Button5)
|
else if(ev->button == Button5)
|
||||||
|
|
1
event.h
1
event.h
|
@ -42,6 +42,7 @@ void handle_event_shape(XEvent *, awesome_config *);
|
||||||
void handle_event_randr_screen_change_notify(XEvent *, awesome_config *);
|
void handle_event_randr_screen_change_notify(XEvent *, awesome_config *);
|
||||||
|
|
||||||
UICB_PROTO(uicb_movemouse);
|
UICB_PROTO(uicb_movemouse);
|
||||||
|
UICB_PROTO(uicb_resizemouse);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99
|
||||||
|
|
Loading…
Reference in New Issue