Re: multi head porting



Hans Breuer <hans breuer org> writes:

> Hi Owen,
> it continously appears to me that I don't make myself clear.
> Hopefully the attached patch is enough in the spirit of Gtk+
> that it finally will become acceptable. 
> If this second try doesn't show up the right direction I'm 
> afraid I won't be able to fix the gtk/win32 build myself.

I've committed a version of your patch now. 

(It had conflicts with several outstanding patches from Erwann;
it was easiest to just merge them all and commit.)

The main difference from your patch is that I moved the 
stub GdkDisplay and GdkScreen implementations into 
gdkdisplay-win32.c and gdkscreen-win32.c, rather than
keeping the scheme of having stub implementations
in the base class that were overriden.

Reasons:

 - As per bug #79990, we were removing most of the virtualization
   from GdkScreen and GdkDisplay; it was quite a bit 
   of complexity and overhead for little gain.

   So putting the 1-screen 1-monitor implementations in the base
   class didn't work.

 - The amount of code in the stub functions is small; the 
   amount of interesting code is miniscule. It simply
   wasn't worth a lot of effort to try and share it between
   non-X backends.

[...]

> Isn't changing the size of public structs like GdkVisual and
> GdkColormap an ABI breakage ?

Nope. These structures:

 - Cannot be derived from
 - Cannot be allocated

So elements can be added at the end of the structure without
any incompatibility.

I did go with your change to keep GdkScreen out of the public
structures ... it was simply easier than sorting it out from
your rest of your patch..

> >The number of colormaps and visuals just isn't big enough to 
> >worry about 4 bytes extra per object... might be a waste of
> >50 bytes for the app.
> >
> I wasn't worring about the size of these objects but about the
> ABI breakage and the clumsiness to manage information only
> required in the special case X11/multihead in every backend.

This effort:

 colormap->screen = gdk_get_default_screen()

Would have been tiny compared to the amount of time I spent
fixing up gdk/x11 for your removal of colormap->screen; not
to mention the effort that you spent in doing the removal. :-)

> Remaining todo for function moving:
> gdk_flush, gdk_window_lookup, gdk_colormap_get_system_size, ...

I moved the ones I noticed. (There were a number of other one,s
not sure if I got the ones you mentioned)

> Missing implementations in the X11 backend:
> gdk_colormap_get_screen(), gdk_visual_get_screen ()

Added these.

Regards,
                                        Owen



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