On Fri, Nov 12 2010, Stefan Monnier wrote:
static void
set_wm_state (Lisp_Object frame, int add, Atom atom, Atom value)
{
struct x_display_info *dpyinfo = FRAME_X_DISPLAY_INFO (XFRAME (frame));
x_send_client_event (frame, make_number (0), frame,
dpyinfo->Xatom_net_wm_state,
make_number (32),
/* 1 = add, 0 = remove */
Fcons
(make_number (add ? 1 : 0),
Fcons
(atom,
value != 0 ? value : Qnil)));
}
The error is to put an "Atom" into a cons cell: those can only hold
Lisp_Objects. The usual compilation flags won't catch the error because
both types are actually some kind of integer, but if you
compile --enable-use-lisp-union-type, the C compiler will
dutyfully burp.
Good catch Stefan. I should use this flag to compile my code now.
The fix should be easy I think, you just need to replace atom with
make_number (atom).
I can provide a patch is that handier.