Prevents an Xlib warning on Xnest, or Xorg with xinerama, or other
non-RANDR-capable xserver. Reintroduce a have_randr12 field in
GdkDisplayX11 to avoid having to call XRRQuery{Extension,Version} twice,
and don't select randr 1.2 events if that's false.
https://bugzilla.gnome.org/show_bug.cgi?id=634711
Signed-off-by: Julien Cristau <jcristau@debian.org>
Moving the direct-access redefinitions of various macros
to gdkprivate-x11.h and use that header throughout in x11/.
Also remove a workaround for a long-fixed X server bug.
The X11 backend exports a number of symbols which are _-prefixed
(so don't become part of the gdk api), but are not named in a
way to prevent accidental clashes between backends.
The one API change here is that the gdk_xid_table functions
have been removed - they did not server an purpose, since the
xid table only stores windows anyway, and we already have a
lookup-by-xid function for windows.
Commandline arguments should go away altogether, but this one
goes first, since we then don't need to worry about
_gdk_windowing_substitute_screen_number anymore.
It turned out no vfuncs were necessary. I've decided to move
the screen member up to GdkVisual, since it is the same in all
backends. The X11 backend subclasses now, to add the X members
that it needs to keep track of. GdkVisual and GdkVisualClass
are hidden now.
Scanner doesn't detect this case correctly because it's a typedef;
work around it here by explicitly specifying that it's caller
allocates. See bug 636393 for the scanner issue.
In particular, the following functions are gone:
- gdk_screen_get_default_colormap()
- gdk_screen_set_default_colormap()
- gdk_screen_get_system_colormap()
- gdk_screen_get_rgba_colormap()
It doesn't make sense to determine an index into an array, if
you are going to sort the array afterwards...pointed out in
bug 615128 by Florian Scandella.
Currently gdk_screen_get_primary_monitor just returns the first monitor,
in this case but both the panel and now gnome-shell use an additional
heuristic to prefer LVDS as primary if present.
Move this heuristic to gdk_screen_get_primary_monitor to avoid duplicating
it all over the place.
The fallback heuristic is also used when no primary output is set.
https://bugzilla.gnome.org/show_bug.cgi?id=614894
The Gdk-custom.c file in gir-repository contained a number of
introspection annotations. Merge those into the GDK source files.
Some documentation was moved from the tmpl/ files to accomodate
the addition of annotations.
https://bugzilla.gnome.org/show_bug.cgi?id=592279
When RandR 1.2 X driver doesn't return any usable multihead data the
monitors array is freed, without freeing the memory allocated by the array
elements before. Fixes bug #578354
* gdk/x11/gdkevents-x11.c:
* gdk/x11/gdkscreen-x11.[hc]: Another attempt at getting Xrandr
screen size changes right. Actually handle XRRScreenChangeNotify
events, and ignore root ConfigureNotify events if we are using
Xrandr. Only emit size-changed signals if the screen size changed,
and only emit monitor-changed signals if the monitors changed.
svn path=/trunk/; revision=22398
2009-02-19 Ray Strode <rstrode@redhat.com>
* gdk/x11/gdkscreen-x11.c
(monitor_compare_function), (init_randr13):
After using randr to get a list of monitors,
sort the list such that the biggest output
of "cloned" outputs comes first in the list.
This helps apps that don't generally handle
overlapping outputs to work better in randr
clone mode.
svn path=/trunk/; revision=22386