mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
cvsimport
This commit is contained in:
commit
901a75d3c6
16
mousefunc.c
16
mousefunc.c
@ -78,7 +78,7 @@ void
|
|||||||
mousefunc_window_resize(struct client_ctx *cc, void *arg)
|
mousefunc_window_resize(struct client_ctx *cc, void *arg)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
Time time = 0;
|
Time ltime = 0;
|
||||||
struct screen_ctx *sc = cc->sc;
|
struct screen_ctx *sc = cc->sc;
|
||||||
int x = cc->geom.x, y = cc->geom.y;
|
int x = cc->geom.x, y = cc->geom.y;
|
||||||
|
|
||||||
@ -108,13 +108,13 @@ mousefunc_window_resize(struct client_ctx *cc, void *arg)
|
|||||||
mousefunc_sweep_draw(cc);
|
mousefunc_sweep_draw(cc);
|
||||||
|
|
||||||
/* don't resize more than 60 times / second */
|
/* don't resize more than 60 times / second */
|
||||||
if ((ev.xmotion.time - time) > (1000 / 60)) {
|
if ((ev.xmotion.time - ltime) > (1000 / 60)) {
|
||||||
time = ev.xmotion.time;
|
ltime = ev.xmotion.time;
|
||||||
client_resize(cc);
|
client_resize(cc);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
if (time)
|
if (ltime)
|
||||||
client_resize(cc);
|
client_resize(cc);
|
||||||
XUnmapWindow(X_Dpy, sc->menuwin);
|
XUnmapWindow(X_Dpy, sc->menuwin);
|
||||||
XReparentWindow(X_Dpy, sc->menuwin, sc->rootwin, 0, 0);
|
XReparentWindow(X_Dpy, sc->menuwin, sc->rootwin, 0, 0);
|
||||||
@ -136,7 +136,7 @@ void
|
|||||||
mousefunc_window_move(struct client_ctx *cc, void *arg)
|
mousefunc_window_move(struct client_ctx *cc, void *arg)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
Time time = 0;
|
Time ltime = 0;
|
||||||
int px, py;
|
int px, py;
|
||||||
|
|
||||||
client_raise(cc);
|
client_raise(cc);
|
||||||
@ -168,13 +168,13 @@ mousefunc_window_move(struct client_ctx *cc, void *arg)
|
|||||||
cc->bwidth, Conf.snapdist);
|
cc->bwidth, Conf.snapdist);
|
||||||
|
|
||||||
/* don't move more than 60 times / second */
|
/* don't move more than 60 times / second */
|
||||||
if ((ev.xmotion.time - time) > (1000 / 60)) {
|
if ((ev.xmotion.time - ltime) > (1000 / 60)) {
|
||||||
time = ev.xmotion.time;
|
ltime = ev.xmotion.time;
|
||||||
client_move(cc);
|
client_move(cc);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
if (time)
|
if (ltime)
|
||||||
client_move(cc);
|
client_move(cc);
|
||||||
xu_ptr_ungrab();
|
xu_ptr_ungrab();
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user