Re: Gdk support for multiple Screens




julian.gosnell@nomura.co.uk writes:

> I've been through the archives for this list for the year so far and can see
>  nothing on this.
> 
> What is the gdk/gtk position on multiple screens ?

I suppose, the first question is, do you mean multiple displays,
or multiple screens. Supporting multiple screens on one display
is somewhat easier than supporting multiple displays, because
some things like fonts are shared between on the displays of
one screen. On the other hand, once you support multiple displays,
than multiple screens could simply be treated as a special case -
using a different connection for X for each screen.
 
> Looking through the source my immediate concern is that Gdk only seems to
>  support a single screen at a time.
>
> Are there plans to support multiple screens ? Is it included in a project plan ?
>  Is there a timescale ?

It has been discussed some. (Partly in the context of the Xprt
extension, which would require support for multiple displays)
It is not a top priority - so probably won't be done in the
immediate future, unless somebody with an interest in it picks
up the job.

What would be involved: (I'm discussing here from a multiple-display
point of view. Once that was done, multiple screens would be easy)

GDK:

 - XID's need to be tracked on a per-display basis.
 - Events need to be retrieved from multiple event queues and
   dispatched to the correct window.
 - All globally stored information such as the list of XInput
   devices, the list of visuals, the current Input Method, needs
   to be tracked on a per-display basis.
 - Code such as gdk_font_load() and gdk_colormap_new() that 
   uses gdk_display to figure out the display needs an alternate
   method of getting the current display. One possibility 
   is a 'context' structure that holds the current display
   and screen for such calls. New variants could be added
   for multiple-display-savvy programs.

GTK:

 - The code for handling selections and DND needs to be able
   to handle multiple such events going on on different displays
   at the same time.
 - A way to specify the visual for newly created windows is 
   needed. (Perhaps gtk_widget_push_screen() to go along with
   gtk_widget_push_visual(), etc.)

That's just a brief summary. It would be a reasonable amount
of work, but not a huge job. (Much easier, say, then porting
GTK+ to windows)
 
> I am writing an App that really needs this functionality so any input on this
>  would be very welcome.

Just supporting one user working on multiple screens on the
same display would be much easier than the above. All you
woudl really to add for that is:

 - A method to get the root window for a specified screen.
 - The ability to find the visuals for a given screen.

Regards,
                                        Owen
   



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