focus(): clear XUrgencyHint from the container window
Use UTF8_STRING instead of COMPOUND_TEXT
Using XCompoundTextStyle makes gnome-shell issue countless warnings in
the message log when switching between tabs or selecting text:
gnome-shell[5357]: Window manager warning: Window 0x800003 has property
_NET_WM_NAME that was expected to have type UTF8_STRING format 8 and
actually has type COMPOUND_TEXT format 8 n_items 0. This is most likely
an application bug, not a window manager bug. The window has
title="0:2:vim - "hostname" " class="tabbed" name="tabbed"
restore SIGCHLD sighandler to default before spawning a program
From sigaction(2):
A child created via fork(2) inherits a copy of its parent's signal dispositions.
During an execve(2), the dispositions of handled signals are reset to the default;
the dispositions of ignored signals are left unchanged.
This refused to start directly some programs from configuring in config.h:
Some reported programs that didn't start were: mpv.
Similar to the commit e81f17d4c196aaed6893fd4beed49991caa3e2a4 from dwm.
include X11/keysym.h: improve compatibility with older systems
This matches dwm too.
This makes it compile cleanly on a tested Slackware 11 system.
fix: faulty zombie reaping
issues with the current signal handler:
1. die() isn't async-signal-safe
2. there's a race-window during reinstating the signal handler allowing
zombies to be produced (should be rare in practice).
3. if waitpid fails, it will clobber the errno which can lead to
undesired codepath being taken on the resuming code (this one can
actually occur in practice).
to reproduce the 3rd issue:
~> ./tabbed &
[1] 20644
0x1800003
~> while :; do kill -s SIGCHLD 20644; done >&2 2>/dev/null
XIO: fatal IO error 10 (No child processes) on X server ":0"
after 47 requests (47 known processed) with 0 events remaining.
[1] + exit 1 ./tabbed
set the signal handler to SIG_IGN to reap zombies automatically
(according to POSIX.1-2001).
NOTE: this patch follows dwm's commit 712d663. according to the manpage,
none of the sa_flags being set are meaningful since we're using SIG_IGN.
they used to be meaningful on earlier version of the patch where it was
using SIG_DFL, i've kept them here just in case.
Makefile: whoops add proper comment for OpenBSD
Makefile improvements
* Respect system cflags, ldflags, packages can override them all with
TABBED_{CFLAGS,LDFLAGS}. Remove -Wall and -Os and -s.
* Install README as documentation.
* dist: stream directly to a gzipped tarball.
* options: remove it.
* Add ".POSIX:"
* Remove config.mk
Makefile: simplify and remove hiding the build process
Makefile: add xembed.1 in the dist target
config.h: mark keys as const
Fixed crash when window height was less or equal to bar height
When resizing, the embedded client is being resized to (height = wh - bh),
which is (<= 0) if (wh <= bh). This generates a BadValue Error leading to a
crash. This patch fixes that by hiding the tab bar if the window height is too
small, and also sets a min_height WM hint to prevent that situation from
happening in the first place.
Add OpenBSD support to config.mk
Signed-off-by: Lucas Gabriel Vuotto <lgv@nanashi.co>
Embed dmenu in tabbed own window
Signed-off-by: Lucas Gabriel Vuotto <lgv@nanashi.co>
Fix minor inconsistency in man page
Fix movetab and focusurgent when there's no client
Accessing those would crash with a floating point exception.
Move tab selection keybinding from Ctrl-t to Ctrl-`