Xinqi Bao's Git
projects
/
dwm.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
changed occurrences of wmii.de into 10kloc.org in dwm.html, because 10kloc.org is...
[dwm.git]
/
event.c
diff --git
a/event.c
b/event.c
index
0fce36b
..
db95dfd
100644
(file)
--- a/
event.c
+++ b/
event.c
@@
-35,6
+35,10
@@
Key key[] = {
{ Mod1Mask, XK_m, maximize, { 0 } },
{ Mod1Mask, XK_space, dotile, { 0 } },
{ Mod1Mask, XK_Return, zoom, { 0 } },
{ Mod1Mask, XK_m, maximize, { 0 } },
{ Mod1Mask, XK_space, dotile, { 0 } },
{ Mod1Mask, XK_Return, zoom, { 0 } },
+ { ControlMask|ShiftMask,XK_0, heretag, { .i = Tscratch } },
+ { ControlMask|ShiftMask,XK_1, heretag, { .i = Tdev } },
+ { ControlMask|ShiftMask,XK_2, heretag, { .i = Twww } },
+ { ControlMask|ShiftMask,XK_3, heretag, { .i = Twork } },
{ Mod1Mask|ShiftMask, XK_0, replacetag, { .i = Tscratch } },
{ Mod1Mask|ShiftMask, XK_1, replacetag, { .i = Tdev } },
{ Mod1Mask|ShiftMask, XK_2, replacetag, { .i = Twww } },
{ Mod1Mask|ShiftMask, XK_0, replacetag, { .i = Tscratch } },
{ Mod1Mask|ShiftMask, XK_1, replacetag, { .i = Tdev } },
{ Mod1Mask|ShiftMask, XK_2, replacetag, { .i = Twww } },
@@
-58,8
+62,8
@@
movemouse(Client *c)
unsigned int dui;
Window dummy;
unsigned int dui;
Window dummy;
- ocx = c->x;
- ocy = c->y;
+ ocx =
*
c->x;
+ ocy =
*
c->y;
if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove], CurrentTime) != GrabSuccess)
return;
if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
None, cursor[CurMove], CurrentTime) != GrabSuccess)
return;
@@
-73,8
+77,8
@@
movemouse(Client *c)
break;
case MotionNotify:
XSync(dpy, False);
break;
case MotionNotify:
XSync(dpy, False);
- c->x = ocx + (ev.xmotion.x - x1);
- c->y = ocy + (ev.xmotion.y - y1);
+
*
c->x = ocx + (ev.xmotion.x - x1);
+
*
c->y = ocy + (ev.xmotion.y - y1);
resize(c, False);
break;
case ButtonRelease:
resize(c, False);
break;
case ButtonRelease:
@@
-90,12
+94,12
@@
resizemouse(Client *c)
XEvent ev;
int ocx, ocy;
XEvent ev;
int ocx, ocy;
- ocx = c->x;
- ocy = c->y;
+ ocx =
*
c->x;
+ ocy =
*
c->y;
if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
None, cursor[CurResize], CurrentTime) != GrabSuccess)
return;
if(XGrabPointer(dpy, root, False, MouseMask, GrabModeAsync, GrabModeAsync,
None, cursor[CurResize], CurrentTime) != GrabSuccess)
return;
- XWarpPointer(dpy, None, c->win, 0, 0, 0, 0,
c->w,
c->h);
+ XWarpPointer(dpy, None, c->win, 0, 0, 0, 0,
*c->w, *
c->h);
for(;;) {
XMaskEvent(dpy, MouseMask | ExposureMask, &ev);
switch(ev.type) {
for(;;) {
XMaskEvent(dpy, MouseMask | ExposureMask, &ev);
switch(ev.type) {
@@
-105,10
+109,10
@@
resizemouse(Client *c)
break;
case MotionNotify:
XSync(dpy, False);
break;
case MotionNotify:
XSync(dpy, False);
- c->w = abs(ocx - ev.xmotion.x);
- c->h = abs(ocy - ev.xmotion.y);
-
c->x = (ocx <= ev.xmotion.x) ? ocx : ocx -
c->w;
-
c->y = (ocy <= ev.xmotion.y) ? ocy : ocy -
c->h;
+
*
c->w = abs(ocx - ev.xmotion.x);
+
*
c->h = abs(ocy - ev.xmotion.y);
+
*c->x = (ocx <= ev.xmotion.x) ? ocx : ocx - *
c->w;
+
*c->y = (ocy <= ev.xmotion.y) ? ocy : ocy - *
c->h;
resize(c, True);
break;
case ButtonRelease:
resize(c, True);
break;
case ButtonRelease:
@@
-183,13
+187,13
@@
configurerequest(XEvent *e)
if((c = getclient(ev->window))) {
gravitate(c, True);
if(ev->value_mask & CWX)
if((c = getclient(ev->window))) {
gravitate(c, True);
if(ev->value_mask & CWX)
- c->x = ev->x;
+
*
c->x = ev->x;
if(ev->value_mask & CWY)
if(ev->value_mask & CWY)
- c->y = ev->y;
+
*
c->y = ev->y;
if(ev->value_mask & CWWidth)
if(ev->value_mask & CWWidth)
- c->w = ev->width;
+
*
c->w = ev->width;
if(ev->value_mask & CWHeight)
if(ev->value_mask & CWHeight)
- c->h = ev->height;
+
*
c->h = ev->height;
if(ev->value_mask & CWBorderWidth)
c->border = 1;
gravitate(c, False);
if(ev->value_mask & CWBorderWidth)
c->border = 1;
gravitate(c, False);