Compare commits

...

17 Commits
5.7 ... 5.8

Author SHA1 Message Date
f83d61dfe8 removed DEBUG code and added 2010 to the copyright list 2010-05-27 08:20:42 +01:00
c6180949a7 applied Sylvain Laurent's EWMH fullscreen state patch, simplified his patch a bit 2010-05-27 08:19:08 +01:00
1973ab0643 added the related bug reported by voltaic 2010-04-11 18:42:32 +01:00
427053f8d1 pretty printing bugs a bit 2010-04-01 22:34:46 +01:00
a88e0373ef selmon optimisation is needed 2010-04-01 19:39:24 +01:00
aa9f2be24e more debug output, experimental focus optimisation 2010-04-01 00:14:15 +01:00
c53b29e60b quick typo fix 2010-03-31 23:27:30 +01:00
d6bdd03d91 it's debug season for upcoming dwm 5.8, so only use this if you really want to run experimental code or debug code 2010-03-31 23:24:22 +01:00
1144e98394 another bug report 2009-11-25 13:56:17 +00:00
7671d03a90 removed misleading comment, thanks Romain Bertrand 2009-11-24 09:31:17 +00:00
bc554d45d8 added nsz's last bug corner case 2009-11-23 08:13:18 +00:00
ac4caea921 added BUGS, next version is 5.8 2009-10-31 11:45:56 +00:00
161f2d921b Added tag 5.7.2 for changeset 15761ac5e2f1 2009-09-27 20:20:14 +01:00
210378f198 applied Ryan Zheng's patch and re-releasing 5.7.2 2009-09-27 20:20:10 +01:00
7879616a75 Added tag 5.7.1 for changeset 48c3f87c335d 2009-09-27 10:31:20 +01:00
9e8dd3479d fixed the layout symbol bug reported by Nibble (but using a different approach as he suggested)
- optimised drawbar() and arrange() handling for multiple monitors, arrange only arranges the relevant monitors when applicable, same with drawbar
- need to release 5.7.1
2009-09-27 10:31:14 +01:00
0b72be924d Added tag 5.7 for changeset 257403d4cd96 2009-09-26 19:52:04 +01:00
6 changed files with 169 additions and 40 deletions

View File

@ -63,3 +63,6 @@ e4bcaca8e6ef13d2c3b81f1218ad15e5da4d68bd 5.2
deaa276abac17ca08fbeb936916e4c8292d293a4 5.5
5550702215773aad462f22a774dced9b87437c51 5.6
e47a47bd3ed42fd3cf023572147b75ebc2adef82 5.6.1
257403d4cd962cac03344a871ea56cc742bae38e 5.7
48c3f87c335d6606e55fbae97267fa6b39ca56e0 5.7.1
15761ac5e2f1e9010900f891616a24a22d82f128 5.7.2

97
BUGS Normal file
View File

@ -0,0 +1,97 @@
---
18:17 < Biolunar> when i change my resolution in dwm (to a smaller one) and then back to the native, the top bar is not repainted. that's since 5.7.2, in 5.6 it worked fine
18:19 < Biolunar> is it just happening to me or a (known) bug?
18:24 < Biolunar> and in addition, mplayers fullscreen is limited to the small resolution after i changed it back to the native
reproducible with xrandr -s but not with --output and --mode, strange
---
> enternotify is handled even when the entered window is already focused
> (eg moving the mouse to the bar and back, scrolling on the border..)
>
> focusing might be expensive for some clients (eg dim/light up)
>
> a possible solution is to modify enternotify:
>
> + c = wintoclient(ev->window);
> if((m = wintomon(ev->window)) && m != selmon) {
> unfocus(selmon->sel);
> selmon = m;
> }
> + else if (c == selmon->sel || c == NULL)
> + return;
---
> another corner case:
a tiled client can be resized with mod+right click, but it only works
on the main monitor
---
dmenu appears on the monitor where the pointer is and not on selmon
---
yet another corner case:
open a terminal, focus another monitor, but without moving the mouse
pointer there
if there is no client on the other monitor to get the focus, then the
terminal will be unfocused but it will accept input
---
Donald Allen reported this:
starting emacs from dmenu in archlinux results in missing configure of emacs, but mod1-space or mod1-shift-space fix this problem. this problem is new and did not happen in 1.6 xorg servers
Starting emacs from xterm doesnt show this problem, he uses tag 8 for emacs
---
2009/12/7 Alexandr Krylovskiy <wing_AT_tversu.ru>:
> Fullscreen mode with flash applications (youtube, for example) doesn't
> work properly neither in tiled nor in floating mode.
> Fullscreen window closes immediately after opening.
This is a known bug (for some curiosity I received the same report via
privmail from 2 other people within one week, really strange).
The quick fix is commenting out the code in lines 817/818 in hg tip
dwm. I cannot confirm this has no side effects (I think it does) and I
will address this issue shortly with a real fix.
---
SDL seems to not like non-reparenting WMs:
> I would like to mention SDL problems, however SDL is not crucial to
> me anymore; people that really care about it should speak up and
> propose dwm / SDL patch or cooperation scheme in that matter.
Patching SDL, bugging them?
---
voltaic reports this:
When I use two monitors, one larger in resolution than the other, the
bar is drawn using the smaller x-dimension on both screens. I think
what's happening is that there are two bars drawn, but the short bar
is always on top of the long bar such that I can't see the information
under the short bar. If I switch to the small screen, hide the short
bar, and then switch to the large screen, the long bar is drawn
correctly.
A similar problem occurs when I have started dwm on a small resolution
monitor (laptop screen) and then I switch to a large external display.
When I do this, the bar itself is drawn for the original smaller
resolution, but the information to be printed on the bar is
right-aligned for a longer bar. So what I see is a bar that has the
right hand side of it cut-off. See attached screenshot.
I am using standard options for xrandr such as --output VGA1 --auto, etc.
---

View File

@ -1,6 +1,6 @@
MIT/X Consortium License
© 2006-2009 Anselm R Garbe <garbeam at gmail dot com>
© 2006-2010 Anselm R Garbe <anselm@garbe.us>
© 2006-2007 Sander van Dijk <a dot h dot vandijk at gmail dot com>
© 2006-2009 Jukka Salmi <jukka at salmi dot ch>
© 2007-2009 Premysl Hruby <dfenze at gmail dot com>

View File

@ -1,7 +1,7 @@
/* See LICENSE file for copyright and license details. */
/* appearance */
static const char font[] = "-*-*-medium-*-*-*-14-*-*-*-*-*-*-*";
static const char font[] = "-*-terminus-medium-r-*-*-16-*-*-*-*-*-*-*";
static const char normbordercolor[] = "#cccccc";
static const char normbgcolor[] = "#cccccc";
static const char normfgcolor[] = "#000000";

View File

@ -1,5 +1,5 @@
# dwm version
VERSION = 5.7
VERSION = 5.8
# Customize below to fit your system
@ -10,7 +10,7 @@ MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# Xinerama, un-comment if you want it
# Xinerama
XINERAMALIBS = -L${X11LIB} -lXinerama
XINERAMAFLAGS = -DXINERAMA
@ -20,10 +20,10 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 ${XINERAMALIBS}
# flags
CPPFLAGS = -DVERSION=\"${VERSION}\" ${XINERAMAFLAGS}
#CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
#LDFLAGS = -g ${LIBS}
LDFLAGS = -s ${LIBS}
CFLAGS = -g -std=c99 -pedantic -Wall -O0 ${INCS} ${CPPFLAGS}
#CFLAGS = -std=c99 -pedantic -Wall -Os ${INCS} ${CPPFLAGS}
LDFLAGS = -g ${LIBS}
#LDFLAGS = -s ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"

93
dwm.c
View File

@ -57,7 +57,8 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
enum { ColBorder, ColFG, ColBG, ColLast }; /* color */
enum { NetSupported, NetWMName, NetLast }; /* EWMH atoms */
enum { NetSupported, NetWMName, NetWMState,
NetWMFullscreen, NetLast }; /* EWMH atoms */
enum { WMProtocols, WMDelete, WMState, WMLast }; /* default atoms */
enum { ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle,
ClkClientWin, ClkRootWin, ClkLast }; /* clicks */
@ -152,7 +153,8 @@ typedef struct {
/* function declarations */
static void applyrules(Client *c);
static Bool applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact);
static void arrange(void);
static void arrange(Monitor *m);
static void arrangemon(Monitor *m);
static void attach(Client *c);
static void attachstack(Client *c);
static void buttonpress(XEvent *e);
@ -160,6 +162,7 @@ static void checkotherwm(void);
static void cleanup(void);
static void cleanupmon(Monitor *mon);
static void clearurgent(Client *c);
static void clientmessage(XEvent *e);
static void configure(Client *c);
static void configurenotify(XEvent *e);
static void configurerequest(XEvent *e);
@ -248,6 +251,7 @@ static int (*xerrorxlib)(Display *, XErrorEvent *);
static unsigned int numlockmask = 0;
static void (*handler[LASTEvent]) (XEvent *) = {
[ButtonPress] = buttonpress,
[ClientMessage] = clientmessage,
[ConfigureRequest] = configurerequest,
[ConfigureNotify] = configurenotify,
[DestroyNotify] = destroynotify,
@ -379,18 +383,24 @@ applysizehints(Client *c, int *x, int *y, int *w, int *h, Bool interact) {
}
void
arrange(void) {
Monitor *m;
for(m = mons; m; m = m->next)
arrange(Monitor *m) {
if(m)
showhide(m->stack);
else for(m = mons; m; m = m->next)
showhide(m->stack);
focus(NULL);
for(m = mons; m; m = m->next) {
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
if(m->lt[m->sellt]->arrange)
m->lt[m->sellt]->arrange(m);
restack(m);
}
if(m)
arrangemon(m);
else for(m = mons; m; m = m->next)
arrangemon(m);
}
void
arrangemon(Monitor *m) {
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, sizeof m->ltsymbol);
if(m->lt[m->sellt]->arrange)
m->lt[m->sellt]->arrange(m);
restack(m);
}
void
@ -546,7 +556,7 @@ configurenotify(XEvent *e) {
updatebars();
for(m = mons; m; m = m->next)
XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh);
arrange();
arrange(NULL);
}
}
}
@ -840,7 +850,8 @@ focusmon(const Arg *arg) {
if(!mons->next)
return;
m = dirtomon(arg->i);
if((m = dirtomon(arg->i)) == selmon)
return;
unfocus(selmon->sel);
selmon = m;
focus(NULL);
@ -1139,7 +1150,7 @@ manage(Window w, XWindowAttributes *wa) {
XMoveResizeWindow(dpy, c->win, c->x + 2 * sw, c->y, c->w, c->h); /* some windows require this */
XMapWindow(dpy, c->win);
setclientstate(c, NormalState);
arrange();
arrange(c->mon);
}
void
@ -1265,7 +1276,7 @@ propertynotify(XEvent *e) {
case XA_WM_TRANSIENT_FOR:
XGetTransientForHint(dpy, c->win, &trans);
if(!c->isfloating && (c->isfloating = (wintoclient(trans) != NULL)))
arrange();
arrange(c->mon);
break;
case XA_WM_NORMAL_HINTS:
updatesizehints(c);
@ -1283,6 +1294,20 @@ propertynotify(XEvent *e) {
}
}
void
clientmessage(XEvent *e) {
XClientMessageEvent *cme = &e->xclient;
if(cme->message_type == netatom[NetWMState] && cme->data.l[1] == netatom[NetWMFullscreen]) {
if(cme->data.l[0])
XChangeProperty(dpy, cme->window, netatom[NetWMState], XA_ATOM, 32,
PropModeReplace, (unsigned char*)&netatom[NetWMFullscreen], 1);
else
XChangeProperty(dpy, cme->window, netatom[NetWMState], XA_ATOM, 32,
PropModeReplace, (unsigned char*)0, 0);
}
}
void
quit(const Arg *arg) {
running = False;
@ -1360,7 +1385,7 @@ restack(Monitor *m) {
XEvent ev;
XWindowChanges wc;
drawbars();
drawbar(m);
if(!m->sel)
return;
if(m->sel->isfloating || !m->lt[m->sellt]->arrange)
@ -1381,12 +1406,12 @@ restack(Monitor *m) {
void
run(void) {
XEvent ev;
/* main event loop */
XSync(dpy, False);
while(running && !XNextEvent(dpy, &ev))
while(running && !XNextEvent(dpy, &ev)) {
if(handler[ev.type])
handler[ev.type](&ev); /* call handler */
}
}
void
@ -1427,7 +1452,7 @@ sendmon(Client *c, Monitor *m) {
attach(c);
attachstack(c);
focus(NULL);
arrange();
arrange(NULL);
}
void
@ -1444,10 +1469,11 @@ setlayout(const Arg *arg) {
selmon->sellt ^= 1;
if(arg && arg->v)
selmon->lt[selmon->sellt] = (Layout *)arg->v;
strncpy(selmon->ltsymbol, selmon->lt[selmon->sellt]->symbol, sizeof selmon->ltsymbol);
if(selmon->sel)
arrange();
arrange(selmon);
else
drawbars();
drawbar(selmon);
}
/* arg > 1.0 will set mfact absolutly */
@ -1461,7 +1487,7 @@ setmfact(const Arg *arg) {
if(f < 0.1 || f > 0.9)
return;
selmon->mfact = f;
arrange();
arrange(selmon);
}
void
@ -1485,6 +1511,8 @@ setup(void) {
wmatom[WMState] = XInternAtom(dpy, "WM_STATE", False);
netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False);
netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False);
netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False);
netatom[NetWMFullscreen] = XInternAtom(dpy, "_NET_WM_STATE_FULLSCREEN", False);
/* init cursors */
cursor[CurNormal] = XCreateFontCursor(dpy, XC_left_ptr);
cursor[CurResize] = XCreateFontCursor(dpy, XC_sizing);
@ -1558,7 +1586,7 @@ void
tag(const Arg *arg) {
if(selmon->sel && arg->ui & TAGMASK) {
selmon->sel->tags = arg->ui & TAGMASK;
arrange();
arrange(selmon);
}
}
@ -1615,7 +1643,7 @@ togglebar(const Arg *arg) {
selmon->showbar = !selmon->showbar;
updatebarpos(selmon);
XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh);
arrange();
arrange(selmon);
}
void
@ -1626,7 +1654,7 @@ togglefloating(const Arg *arg) {
if(selmon->sel->isfloating)
resize(selmon->sel, selmon->sel->x, selmon->sel->y,
selmon->sel->w, selmon->sel->h, False);
arrange();
arrange(selmon);
}
void
@ -1638,7 +1666,7 @@ toggletag(const Arg *arg) {
newtags = selmon->sel->tags ^ (arg->ui & TAGMASK);
if(newtags) {
selmon->sel->tags = newtags;
arrange();
arrange(selmon);
}
}
@ -1648,7 +1676,7 @@ toggleview(const Arg *arg) {
if(newtagset) {
selmon->tagset[selmon->seltags] = newtagset;
arrange();
arrange(selmon);
}
}
@ -1663,6 +1691,7 @@ unfocus(Client *c) {
void
unmanage(Client *c, Bool destroyed) {
Monitor *m = c->mon;
XWindowChanges wc;
/* The server grab construct avoids race conditions. */
@ -1681,7 +1710,7 @@ unmanage(Client *c, Bool destroyed) {
}
free(c);
focus(NULL);
arrange();
arrange(m);
}
void
@ -1908,7 +1937,7 @@ view(const Arg *arg) {
selmon->seltags ^= 1; /* toggle sel tagset */
if(arg->ui & TAGMASK)
selmon->tagset[selmon->seltags] = arg->ui & TAGMASK;
arrange();
arrange(selmon);
}
Client *
@ -1986,13 +2015,13 @@ zoom(const Arg *arg) {
detach(c);
attach(c);
focus(c);
arrange();
arrange(c->mon);
}
int
main(int argc, char *argv[]) {
if(argc == 2 && !strcmp("-v", argv[1]))
die("dwm-"VERSION", © 2006-2009 dwm engineers, see LICENSE for details\n");
die("dwm-"VERSION", © 2006-2010 dwm engineers, see LICENSE for details\n");
else if(argc != 1)
die("usage: dwm [-v]\n");
if(!setlocale(LC_CTYPE, "") || !XSupportsLocale())