mirror of
https://github.com/dylanaraps/sowm.git
synced 2026-11-21 20:01:57 +00:00
sowm: None is just 0 and it's shorter
This commit is contained in:
1 file changed
+4
-4
@@ -179,7 +179,7 @@ void notify_enter(XEvent *e) {
|
|||||||
The window is then moved or resized.
|
The window is then moved or resized.
|
||||||
*/
|
*/
|
||||||
void notify_motion(XEvent *e) {
|
void notify_motion(XEvent *e) {
|
||||||
if (mouse.subwindow == None) return;
|
if (mouse.subwindow == 0) return;
|
||||||
|
|
||||||
int xd = e->xbutton.x_root - mouse.x_root;
|
int xd = e->xbutton.x_root - mouse.x_root;
|
||||||
int yd = e->xbutton.y_root - mouse.y_root;
|
int yd = e->xbutton.y_root - mouse.y_root;
|
||||||
@@ -223,7 +223,7 @@ void key_press(XEvent *e) {
|
|||||||
or resize.
|
or resize.
|
||||||
*/
|
*/
|
||||||
void button_press(XEvent *e) {
|
void button_press(XEvent *e) {
|
||||||
if (e->xbutton.subwindow == None) return;
|
if (e->xbutton.subwindow == 0) return;
|
||||||
|
|
||||||
win_size(e->xbutton.subwindow, &wx, &wy, &ww, &wh);
|
win_size(e->xbutton.subwindow, &wx, &wy, &ww, &wh);
|
||||||
XRaiseWindow(d, e->xbutton.subwindow);
|
XRaiseWindow(d, e->xbutton.subwindow);
|
||||||
@@ -240,7 +240,7 @@ void button_press(XEvent *e) {
|
|||||||
void button_release() {
|
void button_release() {
|
||||||
for win if (c->w == mouse.subwindow) c->f = 0;
|
for win if (c->w == mouse.subwindow) c->f = 0;
|
||||||
|
|
||||||
mouse.subwindow = None;
|
mouse.subwindow = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -552,7 +552,7 @@ int main(void) {
|
|||||||
for (int i=1; i<4; i+=2)
|
for (int i=1; i<4; i+=2)
|
||||||
XGrabButton(d, i, MOD, root, True,
|
XGrabButton(d, i, MOD, root, True,
|
||||||
ButtonPressMask|ButtonReleaseMask|PointerMotionMask,
|
ButtonPressMask|ButtonReleaseMask|PointerMotionMask,
|
||||||
GrabModeAsync, GrabModeAsync, None, None);
|
GrabModeAsync, GrabModeAsync, 0, 0);
|
||||||
|
|
||||||
while (1 && !XNextEvent(d, &ev))
|
while (1 && !XNextEvent(d, &ev))
|
||||||
if (events[ev.type]) events[ev.type](&ev);
|
if (events[ev.type]) events[ev.type](&ev);
|
||||||
|
|||||||
Reference in new issue
Block a user