Re: Shared memory and images on remote X server



Owen Taylor <otaylor@redhat.com> writes:

> Greg Badros <gjb@cs.washington.edu> writes:
> 
> > I'm having problems using guile-gtk from within Scwm displaying on a
> > remote X server.  Gtk seems to want to use the shared memory and X
> > shared memory extensions despite using a remote display.  Is there any
> > (run-time) way to turn off the shared memory extension?  Shouldn't gtk
> > automatically get this right when the DISPLAY is remote?
> 
> Yes. And I use GTK+ over a remote connection constantly.

Yep, me too... that's why it was weird that it didn't work with Scwm and 
guile-gtk.

> See the code around line 264 of gdkimage.c. The only reliable
> way of detecting the remote display case is to catch the
> failure when you first try to create a shared image, so
> this is what GDK does.

<snip>

Ah... yes, that explains it.  Scwm takes over the X11 error handler as
does gdk. Around line 258 gdkimage.c is using the global variable
gdk_error_code to communicate a failed shared memory attachment.  That
gets set in gdk_x_error(), which we never run because we instead execute
our X11 handler, ScwmErrorHandler().

Looks like Scwm needs to be sure to set gdk_x_error in its error
handler-- this is easy to fix.  Thanks for the pointer, Owen!

Greg



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]