[dev] [surf] surf-0.6 crashes
Loving surf unfortunatly it crashes from time to time. Haven't noticed a specific pattern but it sure does not like I'm browsing YouTube. Hope this helps, $ surf -v surf-0.6, ©2009-2014 surf engineers, see LICENSE for details $ git log -1 HEAD --oneline # using latest from repo b4ca032 Removing the debug print from the last commit. $ make options surf build options: CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/local/include/webkitgtk-1.0 -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/pango-1.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/X11R6/include -I/usr/local/include/cairo -I/usr/local/include/atk-1.0 -I/usr/X11R6/include/pixman-1 -I/usr/local/include/libpng16 -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/harfbuzz -I/usr/X11R6/include/freetype2 -I/usr/include -I/usr/local/include/libsoup-2.4 -I/usr/local/include/libxml2 -I/usr/local/include -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -DVERSION="0.6" -D_DEFAULT_SOURCE LDFLAGS = -g -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/local/lib -L/usr/X11R6/lib -Wl,-rpath-link,/usr/X11R6/lib -lwebkitgtk-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -lXrender -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -lXext -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lfontconfig -lfreetype -lz -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -ljavascriptcoregtk-1.0 -lglib-2.0 -lintl -lgthread-2.0 CC = cc $ gdb -q `which surf` ~/surf.core [?1034h(no debugging symbols found) Core was generated by `surf'. Program terminated with signal 11, Segmentation fault. Reading symbols from /usr/lib/libpthread.so.18.0...done. Loaded symbols for /usr/lib/libpthread.so.18.0 Loaded symbols for /usr/local/bin/surf Reading symbols from /usr/lib/libc.so.77.0...done. Loaded symbols for /usr/lib/libc.so.77.0 Reading symbols from /usr/X11R6/lib/libX11.so.16.0...done. Loaded symbols for /usr/X11R6/lib/libX11.so.16.0 Reading symbols from /usr/local/lib/libwebkitgtk-1.0.so.7.0...done. Loaded symbols for /usr/local/lib/libwebkitgtk-1.0.so.7.0 Reading symbols from /usr/local/lib/libgtk-x11-2.0.so.2400.0...done. Loaded symbols for /usr/local/lib/libgtk-x11-2.0.so.2400.0 Reading symbols from /usr/local/lib/libgdk-x11-2.0.so.2400.0...done. Loaded symbols for /usr/local/lib/libgdk-x11-2.0.so.2400.0 Reading symbols from /usr/local/lib/libpangocairo-1.0.so.3600.0...done. Loaded symbols for /usr/local/lib/libpangocairo-1.0.so.3600.0 Reading symbols from /usr/X11R6/lib/libXrender.so.6.0...done. Loaded symbols for /usr/X11R6/lib/libXrender.so.6.0 Reading symbols from /usr/X11R6/lib/libXinerama.so.6.0...done. Loaded symbols for /usr/X11R6/lib/libXinerama.so.6.0 Reading symbols from /usr/X11R6/lib/libXi.so.12.1...done. Loaded symbols for /usr/X11R6/lib/libXi.so.12.1 Reading symbols from /usr/X11R6/lib/libXrandr.so.7.0...done. Loaded symbols for /usr/X11R6/lib/libXrandr.so.7.0 Reading symbols from /usr/X11R6/lib/libXcursor.so.5.0...done. Loaded symbols for /usr/X11R6/lib/libXcursor.so.5.0 Reading symbols from /usr/X11R6/lib/libXcomposite.so.4.0...done. Loaded symbols for /usr/X11R6/lib/libXcomposite.so.4.0 Reading symbols from /usr/X11R6/lib/libXdamage.so.4.0...done. Loaded symbols for /usr/X11R6/lib/libXdamage.so.4.0 Reading symbols from /usr/X11R6/lib/libXfixes.so.6.0...done. Loaded symbols for /usr/X11R6/lib/libXfixes.so.6.0 Reading symbols from /usr/X11R6/lib/libXext.so.13.0...done. Loaded symbols for /usr/X11R6/lib/libXext.so.13.0 Reading symbols from /usr/local/lib/libatk-1.0.so.21209.1...done. Loaded symbols for /usr/local/lib/libatk-1.0.so.21209.1 Reading symbols from /usr/local/lib/libcairo.so.12.2...done. Loaded symbols for /usr/local/lib/libcairo.so.12.2 Reading symbols from /usr/local/lib/libgdk_pixbuf-2.0.so.3000.0...done. Loaded symbols for /usr/local/lib/libgdk_pixbuf-2.0.so.3000.0 Reading symbols from /usr/local/lib/libpangoft2-1.0.so.3600.0...done. Loaded symbols for /usr/local/lib/libpangoft2-1.0.so.3600.0 Reading symbols from /usr/local/lib/libpango-1.0.so.3600.0...done. Loaded symbols for /usr/local/lib/libpango-1.0.so.3600.0 Reading symbols from /usr/lib/libm.so.9.0...done. Loaded symbols for /usr/lib/libm.so.9.0 Reading symbols from /usr/X11R6/lib/libfontconfig.so.9.1...done. Loaded symbols for /usr/X11R6/lib/libfontconfig.so.9.1 Reading symbols from /usr/X11R6/lib/libfreetype.so.22.0...done. Loaded symbols for /usr/X11R6/lib/libfreetype.so.22.0 Reading symbols from /usr/lib/libz.so.5.0...done. Loaded symbols for /usr/lib/libz.so.5.0 Reading symbols from /usr/local/lib/libsoup-2.4.so.8.0...done. Loaded symbols for /usr/local/lib/libsoup-2.4.so.8.0 Reading symbols from /usr/local/lib/libgio-2.0.so.4000.0...done. Loaded symbols for /usr/local/lib/libgio-2.0.so.4000.0 Reading symbols from /usr/local/lib/libgobject-2.0.so.4000.0...done. Loaded symbols for /usr/local/lib/libgobject-2.0.so.4000.0 Reading symbols
[dev] [dwm] [patch] per-window keyboard layout update for dwm-6.0
Hi, I update Evgeny's http://dwm.suckless.org/patches/pwkl patch for version dwm-6.0. Maybe someone will find it usefull. Best regards, Petr diff --git a/dwm.c b/dwm.c index 1d78655..f42dcd5 100644 --- a/dwm.c +++ b/dwm.c @@ -36,6 +36,7 @@ #include #include #include +#include #ifdef XINERAMA #include #endif /* XINERAMA */ @@ -95,6 +96,7 @@ struct Client { Client *snext; Monitor *mon; Window win; + unsigned char kbdgrp; }; typedef struct { @@ -852,6 +854,7 @@ focus(Client *c) { selmon = c->mon; if(c->isurgent) clearurgent(c); + XkbLockGroup(dpy, XkbUseCoreKbd, c->kbdgrp); detachstack(c); attachstack(c); grabbuttons(c, True); @@ -1112,6 +1115,7 @@ manage(Window w, XWindowAttributes *wa) { Client *c, *t = NULL; Window trans = None; XWindowChanges wc; + XkbStateRec kbd_state; if(!(c = calloc(1, sizeof(Client die("fatal: could not malloc() %u bytes\n", sizeof(Client)); @@ -1163,6 +1167,8 @@ manage(Window w, XWindowAttributes *wa) { unfocus(selmon->sel, False); c->mon->sel = c; arrange(c->mon); + XkbGetState(dpy, XkbUseCoreKbd, &kbd_state); + c->kbdgrp = kbd_state.group; XMapWindow(dpy, c->win); focus(NULL); } @@ -1773,12 +1779,16 @@ toggleview(const Arg *arg) { void unfocus(Client *c, Bool setfocus) { + XkbStateRec kbd_state; + if(!c) return; grabbuttons(c, False); XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]); if(setfocus) XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + XkbGetState(dpy, XkbUseCoreKbd, &kbd_state); + c->kbdgrp = kbd_state.group; } void
Re: [dev] [st] [PATCH] Fix sigchld
Indeed the second question applies for koneu's patch, too. I want the shell's exit status reflected in the terminal's. Otherwise, to retreive the shell's exit status, one needs to make silly use of pipe(), in case one uses st as an output layer, for whatever reason. cheers! mar77i
Re: [dev] [st] [PATCH] Fix sigchld
The initial patch seems to cover edge cases I fail to grasp and probably doesn't cover all scenarios. Could someone please tell me why SIGCHLD should be received while requiring waitpid to WNOHANG, and why st prints an error message for nonzero exit status instead of propagating it? I haven't read koneu's suggestion yet, I hope it doesn't leave as much room for questions. cheers! mar77i
Re: [dev] [st] [PATCH] Fix sigchld
* koneu [2015-04-28 05:05]: > Patch attached. st stops responding after spawning a command. signature.asc Description: Digital signature