Hi Owen,

Owen Taylor <[EMAIL PROTECTED]> writes:

> The GIMP currently does something a bit peculiar - it calls 
> gdk_get_use_xshm() and then passes the values it gets from this
> to plugins, which call gdk_set_use_xshm().
> I suppose the reasoning here is to propagate the command line
> --no-xshm to each plugin. If GTK+ is autodetecting the value of
> gdk_use_xshm, as it normally does, then the plugins could
> do that themselves just as well.

What GIMP does is asking GDK if it uses shm (no matter if a
commandline option was given) and passing this boolean to
plug-ins. The plug-in then switches off GDK shm usage (also without
looking at the old vale) if it was passed shm==FALSE from the main
app. (plug-ins never try to explicitly switch it on)

> What I'd like to do is one or more of:
>  - Make gdk_set/get_use_xshm() correspond exactly to the command
>    line option, instead of a mix of the command line option
>    and what has been autodetected so far.
>  - Deprecate gdk_set/get_use_xshm().
>  - Remove the --no-xshm command line option

Yes, please :)

> I believe that the problems that --no-xshm was added to deal
> with have most or all been fixed now and represented bugs in
> the GTK+ shm code. It really makes little sense to me to
> have a command line option to enable a bug workaround ...
> I doubt people want to type gimp --no-xshm all the time, so
> I suspect that if we needed a way of enabling a workaround
> for this, as an environment variable would make more sense.
> Do people use this command line option? Is my understanding
> of what the GIMP is doing correct?

I don't know if people use it but some time ago (before GIMP 1.2)
I fixed it to make plug-ins follow the main app's shm usage

It always looked as a crude hack to me and I fixed it without knowing
what it is exactly used for or if it worked still/better after my fix.

BTW, we are about to strip every bit of GLIB/GDK/GTK
compat/deprecated/broken stuff from CVS GIMP, so please don't stick
with antique code just because GIMP uses it (we're even removing
gtk_signal_* and friends, so please just break GIMP, we will fix it to
use GTK's new APIs :-)

--M - "no compat cruft" - itch
Gimp-developer mailing list

Reply via email to