Introduction
Introduction Statistics Contact Development Disclaimer Help
trefactored Sanders code somewhat - dwm - [fork] customized build of dwm, the d…
git clone git://src.adamsgaard.dk/dwm
Log
Files
Refs
README
LICENSE
---
commit 8af1d973323bd799c1ec021bb7c16860e120cf92
parent 79cd408844c62963aa0eec45bb0414ed66f06f6f
Author: [email protected] <unknown>
Date: Wed, 19 Jul 2006 13:52:31 +0200
refactored Sanders code somewhat
Diffstat:
M client.c | 4 ++--
M dwm.h | 4 ++--
M event.c | 15 ++++-----------
3 files changed, 8 insertions(+), 15 deletions(-)
---
diff --git a/client.c b/client.c
t@@ -315,9 +315,9 @@ resize(Client *c, Bool inc, Corner sticky)
*c->w = c->maxw;
if(c->maxh && *c->h > c->maxh)
*c->h = c->maxh;
- if(sticky == TopRight || sticky == BottomRight)
+ if(sticky == TopRight || sticky == BotRight)
*c->x = right - *c->w;
- if(sticky == BottomLeft || sticky == BottomRight)
+ if(sticky == BotLeft || sticky == BotRight)
*c->y = bottom - *c->h;
resizetitle(c);
XSetWindowBorderWidth(dpy, c->win, 1);
diff --git a/dwm.h b/dwm.h
t@@ -25,9 +25,9 @@ enum { Tscratch, Tdev, Twww, Twork, TLast };
/********** CUSTOMIZE **********/
typedef union Arg Arg;
+typedef struct Client Client;
typedef enum Corner Corner;
typedef struct DC DC;
-typedef struct Client Client;
typedef struct Fnt Fnt;
typedef struct Key Key;
typedef struct Rule Rule;
t@@ -44,7 +44,7 @@ enum { WMProtocols, WMDelete, WMLast };
/* cursor */
enum { CurNormal, CurResize, CurMove, CurLast };
-enum Corner { TopLeft, TopRight, BottomLeft, BottomRight };
+enum Corner { TopLeft, TopRight, BotLeft, BotRight };
struct Fnt {
int ascent;
diff --git a/event.c b/event.c
t@@ -114,17 +114,10 @@ resizemouse(Client *c)
*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;
- if(ocx <= ev.xmotion.x) {
- if(ocy <= ev.xmotion.y)
- sticky = TopLeft;
- else
- sticky = BottomLeft;
- } else {
- if(ocy <= ev.xmotion.y)
- sticky = TopRight;
- else
- sticky = BottomRight;
- }
+ if(ocx <= ev.xmotion.x)
+ sticky = (ocy <= ev.xmotion.y) ? TopLeft : Bot…
+ else
+ sticky = (ocy <= ev.xmotion.y) ? TopRight : Bo…
resize(c, True, sticky);
break;
case ButtonRelease:
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.