Re: Bad portability by =?utf-8?b?Zm9yZWlnbl9uZXdfZm9yX2Rpc3BsYXk=?=

Hans Breuer <hans <at>> writes:

> Current master has three occurences of
> #ifdef GDK_WINDOWING_X11
>    if (GDK_IS_X11_DISPLAY (display))
> followed by some
>      window = gdk_x11_window_lookup_for_display (display, ...);
> Only one was ported to win32 and currently none for OSX, leading
> to e.g. a crash during clipboard copy.
> Wouldn't it be better to add foreign_new_for_display() to
> the display vtable, rather than adding all these ifdefs?
I don't think that'd work very well, for 2 reasons:
1) If it was a vtable entry, what argument would it take? gpointer? We can't use
GdkNativeWindow like GTK2 does, because it's tyepdeffed based on backend and we
can't do that in GTK3 with multiple backends.
2) You need backend-specific code to extract the native window anyway, so
special casing will be necessary.

But you point out one important thing: GtkSocket/GtkPlug are not yet API ready
for multi-backend GTK. They need to be changed before we can ship GTK 3.0.


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