Xinqi Bao's Git
projects
/
dwm.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
9f35cc5
)
changed symbols for float/tiled mode, added mouse-driven mode toggle to buttonpress()
author
Anselm R. Garbe <
[email protected]
>
Fri, 25 Aug 2006 13:06:38 +0000
(15:06 +0200)
committer
Anselm R. Garbe <
[email protected]
>
Fri, 25 Aug 2006 13:06:38 +0000
(15:06 +0200)
draw.c
diff
|
blob
|
history
event.c
diff
|
blob
|
history
diff --git
a/draw.c
b/draw.c
index
7da24f2
..
fb4ba2e
100644
(file)
--- a/
draw.c
+++ b/
draw.c
@@
-94,7
+94,7
@@
drawall()
void
drawstatus()
{
void
drawstatus()
{
- static const char *mode[] = { "
~", "|
" };
+ static const char *mode[] = { "
><", "|=
" };
int i, x;
dc.x = dc.y = 0;
int i, x;
dc.x = dc.y = 0;
diff --git
a/event.c
b/event.c
index
86fb43b
..
35cd4f9
100644
(file)
--- a/
event.c
+++ b/
event.c
@@
-106,16
+106,18
@@
buttonpress(XEvent *e)
if(barwin == ev->window) {
if(ev->x < modew)
if(barwin == ev->window) {
if(ev->x < modew)
- return;
- x = modew;
- for(a.i = 0; a.i < ntags; a.i++) {
- x += textw(tags[a.i]);
- if(ev->x < x) {
- if(ev->button == Button1)
- view(&a);
- else if(ev->button == Button3)
- toggleview(&a);
- return;
+ togglemode(NULL);
+ else {
+ x = modew;
+ for(a.i = 0; a.i < ntags; a.i++) {
+ x += textw(tags[a.i]);
+ if(ev->x < x) {
+ if(ev->button == Button1)
+ view(&a);
+ else if(ev->button == Button3)
+ toggleview(&a);
+ return;
+ }
}
}
}
}
}
}