mirror of
https://github.com/dylanaraps/sowm.git
synced 2025-05-19 09:30:24 -07:00
docs: update
This commit is contained in:
parent
cb68a94196
commit
bbe9255d16
20
sowm.c
20
sowm.c
@ -136,6 +136,24 @@ void notify_enter(XEvent *e) {
|
|||||||
if (e->xcrossing.window != root) FOC(e->xcrossing.window)
|
if (e->xcrossing.window != root) FOC(e->xcrossing.window)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
When the mouse is moved and the paired modifier is
|
||||||
|
pressed this function handles a window move or a window
|
||||||
|
resize.
|
||||||
|
|
||||||
|
'mouse' is defined on a modifier+mouse press and then
|
||||||
|
discarded on a modifier+mouse release.
|
||||||
|
|
||||||
|
The while loop firstly compresses all 'MotionNotify'
|
||||||
|
events down to only the latest which is an optimization
|
||||||
|
when motion happens very quickly.
|
||||||
|
|
||||||
|
There's no use in computing each and every event as we
|
||||||
|
only really care about the newest one.
|
||||||
|
|
||||||
|
The window is then moved or resized and finally its
|
||||||
|
fullscreen value is reset to '0' (False).
|
||||||
|
*/
|
||||||
void notify_motion(XEvent *e) {
|
void notify_motion(XEvent *e) {
|
||||||
client *c;
|
client *c;
|
||||||
|
|
||||||
@ -150,9 +168,9 @@ void notify_motion(XEvent *e) {
|
|||||||
attr.y + (mouse.button==1 ? yd : 0),
|
attr.y + (mouse.button==1 ? yd : 0),
|
||||||
attr.width + (mouse.button==3 ? xd : 0),
|
attr.width + (mouse.button==3 ? xd : 0),
|
||||||
attr.height + (mouse.button==3 ? yd : 0));
|
attr.height + (mouse.button==3 ? yd : 0));
|
||||||
}
|
|
||||||
|
|
||||||
for WIN if (c->w == mouse.subwindow) c->f = 0;
|
for WIN if (c->w == mouse.subwindow) c->f = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void key_grab() {
|
void key_grab() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user