On Tue, 25 Oct 2011 22:10:07 +0200, Anselm R Garbe <[email protected]> wrote:
> On 25 October 2011 13:08, <[email protected]> wrote:
> > Running the example code at the bottom of
> > https://github.com/wedesoft/hornetseye-xorg results in the following
> > error:
> >
> > X Error of failed request: Â BadAtom (invalid Atom parameter)
> > Â Major opcode of failed request: Â 18 (X_ChangeProperty)
> > Â Atom id in failed request: Â 0x0
> > Â Serial number of failed request: Â 10
> > Â Current serial number in output stream: Â 11
> >
> > The same code works well with wmii and fluxbox window managers.
> > Strangely enough it works also from time to time with dwm, but I have no
> > idea how to reproduce these working conditions. Never had problems with
> > other X applications under dwm.
> >
> > I have been able to track the following code
> > The error is raised by
> >
> > Â m_wmProtocols = XInternAtom( display->get(), "WM_PROTOCOLS", False );
> >
> > https://github.com/wedesoft/hornetseye-xorg/blob/master/ext/x11window.cc#L258
> >
> > Unfortunately I am completely clueless when it comes to X programming
> > and would appreciate any help to solve this issue.
>
> Imho you tracked the issue to the wrong line in your code. The issue
> is more likely caused by
> https://github.com/wedesoft/hornetseye-xorg/blob/master/ext/x11window.cc#L255
> (haven't checked though) which in turn refers to
> https://github.com/wedesoft/hornetseye-xorg/blob/master/ext/x11window.cc#L251,
> which might not exist (due to the True as last argument) in case of
> dwm. dwm doesn't use or set any MOTIF hints.
Thanks! Changing that line to
Atom wmProperty = XInternAtom(display->get(), "WM_HINTS", True);
seems to solve the problem.
Christoph