all: update
This commit is contained in:
parent
6c5356143f
commit
fa990be4e6
@ -293,8 +293,9 @@ enternotify(XCrossingEvent *ev)
|
||||
{
|
||||
Client *c;
|
||||
|
||||
if(ev->mode != NotifyNormal
|
||||
if((ev->mode != NotifyNormal
|
||||
|| ev->detail == NotifyInferior)
|
||||
&& ev->window != ROOT)
|
||||
return;
|
||||
|
||||
if((c = client_gb_win(ev->window))
|
||||
|
||||
@ -133,8 +133,7 @@ init_root(void)
|
||||
XSetWindowAttributes at;
|
||||
|
||||
at.event_mask = KeyMask | ButtonMask | MouseMask
|
||||
|SubstructureRedirectMask|SubstructureNotifyMask
|
||||
|EnterWindowMask|LeaveWindowMask|StructureNotifyMask;
|
||||
| SubstructureRedirectMask | SubstructureNotifyMask |StructureNotifyMask;
|
||||
|
||||
at.cursor = cursor[CurNormal];
|
||||
XChangeWindowAttributes(dpy, ROOT, CWEventMask | CWCursor, &at);
|
||||
|
||||
@ -506,7 +506,7 @@ uicb_togglemax(uicb_t cmd)
|
||||
return;
|
||||
}
|
||||
|
||||
/** Set the layout
|
||||
/** Set the layout *CRAP*
|
||||
* \param cmd uicb_t type
|
||||
*/
|
||||
void
|
||||
|
||||
26
src/mouse.c
26
src/mouse.c
@ -40,7 +40,9 @@ mouse_move(Client *c)
|
||||
{
|
||||
int ocx = c->geo.x;
|
||||
int ocy = c->geo.y;
|
||||
int mx = 0, my = 0, dint;
|
||||
int mx = c->geo.x;
|
||||
int my = c->geo.y;
|
||||
int dint;
|
||||
uint duint;
|
||||
Window dw;
|
||||
XRectangle geo = c->geo;
|
||||
@ -56,27 +58,25 @@ mouse_move(Client *c)
|
||||
|
||||
XQueryPointer(dpy, ROOT, &dw, &dw, &mx, &my, &dint, &dint, &duint);
|
||||
|
||||
for(;;)
|
||||
do
|
||||
{
|
||||
XMaskEvent(dpy, MouseMask | ExposureMask | SubstructureRedirectMask, &ev);
|
||||
|
||||
if(ev.type == ButtonRelease)
|
||||
{
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
return;
|
||||
}
|
||||
else if(ev.type == MotionNotify)
|
||||
if(ev.type == MotionNotify)
|
||||
{
|
||||
geo.x = (ocx + (ev.xmotion.x - mx));
|
||||
geo.y = (ocy + (ev.xmotion.y - my));
|
||||
|
||||
client_moveresize(c, geo, True);
|
||||
}
|
||||
else if(ev.type == MapRequest
|
||||
|| ev.type == Expose
|
||||
|| ev.type == ConfigureRequest)
|
||||
getevent(ev);
|
||||
}
|
||||
while(ev.type != ButtonRelease);
|
||||
|
||||
XSync(dpy, False);
|
||||
}
|
||||
else if(ev.type == Expose)
|
||||
expose(&ev.xexpose);
|
||||
}
|
||||
XUngrabPointer(dpy, CurrentTime);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
10
src/util.c
10
src/util.c
@ -77,16 +77,6 @@ color_enlight(ulong col)
|
||||
return col;
|
||||
}
|
||||
|
||||
/** Round function
|
||||
* \param x double type
|
||||
* \return the round of x
|
||||
*/
|
||||
double
|
||||
round(double x)
|
||||
{
|
||||
return (x > 0) ? x + 0.5 : x - 0.5;
|
||||
}
|
||||
|
||||
/** Set the window WM State
|
||||
* \param win Window target
|
||||
* \param state WM State
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user