On Thu, 4 Feb 2010 18:37:39 +0000
Thomas Adam <[email protected]> wrote:

> On Thu, Feb 04, 2010 at 01:21:59PM -0500, MK wrote:
> > I've attached the code I am currently using, the relevant function
> > is fullscreenEWMH (about 45 lines).  Again, this works on fvwm, but
> > returns an X "Bad Request" error anyway.  This may be an Xlib, and
> > not a fvwm
> 
> What type of bad request?  There's many.

Hmm.  Well, as in 1 == BadRequest as defined in X11/X.h  This
corresponds to 

"BadRequest:  The major or minor opcode does not specify
a valid request.   This usually is an Xlib or server error."

from the Xlib manual.  I haven't used xlib much, I am not aware of a
way to refine the error further.

> Yes, this is off-topic.  Send your entire .c file and I'll try and
> take a look.

Thanks for your interest TA.

The last attachment, "window.c" is an entire (headerless) source file.
The whole project is into the 1000's of lines and this is the only file
which deals with EWMH.  

- checkEWMH() is to check and see if the app window can be identified
  and if it includes _NET_WM_ACTION_FULLSCREEN in it's
  _NET_WM_ALLOWED_ACTIONS list (if it has one), which would indicate
  compliance. This works fine.

- fullscreenEWMH() uses XSendEvent to set _NET_WM_STATE_FULLSCREEN on
  the window.  This is the one that produces the error.

- winlist() and winname() are used internally by both the above
  functions.

> You probably just need SubstructureNotifyMask only when sending the
> ClientMessage.

That does seem to be one of the masks that works best.  I'm kind of at
loss on what to use here, as some documentation I have found claims the
mask is not applicable to event of type ClientMessage.    But it does
make a difference.  The one response I got on metacity-devel suggested
using 0 as the mask, which still works on fvwm (with the same
BadRequest error) but even worse on metacity.
 
> You might always want to XInternAtom() _NET_WM_STATE_FULLSCREEN.

Not sure what you mean by "always"?

> (Yet again, 'gq}' in vim to the rescue, your MUA/editor is still not
> wrapping your lines.  Please fix this.)

Hehe.  I thought it was doing it on send, but apparently not.  Anyway,
it's set on input now and seems to be working, lemme know if their are
further problems.

-- 
MK <[email protected]>

Reply via email to