Commit Graph

24 Commits

Author SHA1 Message Date
Benjamin Otte
f7ee5450e1 displaymanager: Remove GInitable implementation
This is not needed anymore, as only one type exists and that type can
always be instantiated.
2013-05-02 16:17:30 +02:00
Benjamin Otte
0122a9da8e x11: Move initialization code
Move it from GdkDisplayManagerX11.init to GdkDisplay.class_init.

This shouldn't cause any problems, but who knows, so keep this patch
small.

Reason for this is the unification of display managers.
2013-05-01 18:11:26 +02:00
Benjamin Otte
a6a4428f23 gdk: Unvfuncify gdk_display_manager_open_display()
This looks like a pretty stupid patch, but it's only a step towards the
ultimate end goal: Get rid of all the displaymanagers.
2013-04-19 16:23:43 -04:00
Benjamin Otte
dd0fec4757 x11: Simplify function
Displays get made default displays automatically, so there's no need to
do it in the vfunc.
2013-04-19 16:18:25 -04:00
Benjamin Otte
f345051d36 displaymanager: Emit display-opened directly
Instead of letting every backend do it manually.
2013-04-19 16:18:25 -04:00
Benjamin Otte
0990c11a83 gdk: Unvfuncify generic key functions
This makes Wayland and X11 no longer call into XKB and libX11 for these
functions but use GDK's own copy of these functions, just like the
win32, quartz and broadway backends.
2013-04-16 15:30:14 +02:00
Benjamin Otte
aa9e974c86 gdk: Make atoms handled generically
This is another step towards making GdkDisplayManager backend-agnostic.

Most of the backends profit from this as their atom implementations
where generic anyway - x11 needed that to allow multiple X displays and
broadway, quartz and wayland don't have the concept of displays.

The X11 backend still did things, so I only #if 0'd some code but did
not actually update anything.
2013-04-15 15:43:27 +02:00
Benjamin Otte
7ef508ff4a displaymanager: Handle list of displays in base class
This moves the add/remove_display() functions from the subclasses to
GdkDisplay and GdkDisplayManager. It also gets rid of the list_displays
vfunc.
2013-04-15 15:43:26 +02:00
Benjamin Otte
f7c0b025b9 displaymanager: Move set_default_display vfunc
... to GdkDisplayClass.make_default. It's only implemented by X11
anyway.
2013-04-15 15:43:26 +02:00
Benjamin Otte
839f402191 displaymanager: Handle the default display
... instead of having every backend do it on their own.
2013-04-15 15:43:26 +02:00
Matthias Clasen
bfcf9e471d Implement GInitable in GdkX11DisplayManager
Add GInitable implementation and fail the initialisation if it is not
possible to connect to the display server.
2013-03-23 00:48:25 -04:00
Cosimo Cecchi
e09cf6978e gdk: only emit display-opened after the default display has been set
This avoids a case where the display has been opened, but calling
gdk_display_get_default() in the callback doesn't work.

Reviewed-by: Benjamin Otte <otte@redhat.com>
2012-10-08 18:44:09 -04:00
Matthias Clasen
de62a1096b Drop support for pre-R6 X
X11 R6 was released in 1995 - time to let go.
2012-03-10 23:27:21 -05:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Michael Natterer
5b74ee38e8 gdk: fix gdk_keyval_to_lower/upper() for Quartz, Win32 and Broadway
In 2.x, the !HAVE_XCONVERTCASE fallback of keyval_convert_case() was
implicitly used as implementation for all !X11 backends.

In 3.x, when this function was virtualized in GdkDisplayManager,
this fallback was moved to the X11 backend and the other backends
"equipped" with /* FIXME implement */ implementations of
keyval_convert_case() which don't convert anything.

Move the fallback code back to gdk/ as default implementation
of GdkDisplayManager::keyval_convert_case() and remove its
implementations is all backends but X11. Also remove the
implementation in Wayland which was a plain copy of what
is now the default implementation.
(cherry picked from commit f46c1b76d8)
2011-10-07 16:19:41 +02:00
Matthias Clasen
9e6d3d969c Fix some possible crashes if the default display is NULL
Unlikely that many people will hit these, but still.
https://bugzilla.gnome.org/show_bug.cgi?id=645176
2011-04-08 21:20:26 -04:00
Matthias Clasen
bb7662392d Don't set the default display to NULL
This was causing segfaults if DISPLAY is unset
2011-01-18 09:36:59 -05:00
Matthias Clasen
48b47971b5 Fix some issues with initial setup of GdkX11DisplayManager
We need to defer setting the default display until the
GdkDisplay is fully initialized. Also, short-circuit some
encoding conversions when creating windows, to avoid an
implicit dependency on the display being in the list of
displays yet.
2010-12-27 01:02:52 -05:00
Matthias Clasen
b3bd184274 Fix a silly typo 2010-12-21 12:19:03 -05:00
Matthias Clasen
146fd989d6 Rename GdkDisplayManagerX11 to GdkX11DisplayManager
And add a gdkx11displaymanager.h header file.
2010-12-21 12:07:09 -05:00
Matthias Clasen
519f09f7f4 Add vfuncs for keyval and window property functions
The keyval functions should really be generic, and the window
property api should be completely revisited, but for now this
will allow us to proceed.
2010-12-21 12:07:03 -05:00
Matthias Clasen
28abd0c75f Add vfuncs for atoms 2010-12-21 12:07:02 -05:00
Matthias Clasen
ea96e5e16f Explode gdkinternals.h into per-class private headers
At the same time, move some more class and instance structs
out of public headers.
2010-12-21 12:06:58 -05:00
Matthias Clasen
ec9c97752d Work toward turning GdkDisplayManager into a backend singleton
This commit hides the GdkDisplayManager instance and class structs,
adds vfuncs for listing displays, opening displays, and getting and
setting the default display. The X11 backend has a derived
GdkDisplayManagerX11.

The gdk_display_manager_get() function is responsible for deciding on
which of the compiled in backends to use. Currently, it consults the
GDK_BACKEND environment variable and falls back to x11.
2010-12-21 12:06:57 -05:00