1
0
Fork 0
Commit graph

26 commits

Author SHA1 Message Date
Emmanuele Bassi
365bd482fb gdk: Use X11 API only when running under X11
Avoid using GdkX11Screen API when the GDK backend being used is not the
X11 one.

https://bugzilla.gnome.org/show_bug.cgi?id=752143
2015-07-09 14:34:11 +01:00
Emmanuele Bassi
2d5b5aa82a gdk: Add function to retrieve the GdkVisual
Straight from Cogl.

This allows us to propagate the GdkVisual Cogl and Clutter use to
embedding toolkits, like GTK+.

The function is annotated as being added to the 1.22 development
cycle because it will be backported to the stable branch, so that
downstream developers can package up a version of Clutter that does
not crash on nVidia.

https://bugzilla.gnome.org/show_bug.cgi?id=747489
2015-06-10 19:09:21 +01:00
Matthieu Bouron
8aea8bc463 clutter-backend-gdk: Only set setting on successful gdk_screen_get_setting call
It could happen that gdk_screen_get_setting fails to retreive
Gdk/WindowScalingFactor which leads to the following warnings when
clutter_init is called:

GLib-GObject-WARNING **: value "0" of type 'gint' is invalid or out of range for property 'window-scaling-factor' of type 'gint'
GLib-GObject-WARNING **: value "0" of type 'gint' is invalid or out of range for property 'dnd-drag-threshold' of type 'gint'

https://bugzilla.gnome.org/show_bug.cgi?id=749256

Slightly edited to fix up whitespace issues.

Edited-by: Emmanuele Bassi <ebassi@gnome.org>
2015-05-12 11:14:14 +01:00
Emmanuele Bassi
8fc8a73580 gdk: Use RGBA visual if there is one
The condition check for the has_rgba_visual flag is reversed, and thus
we relied on drivers returning an ARGB visual first by default.

Referenced by: https://bugzilla.redhat.com/show_bug.cgi?id=1206960
2015-05-07 13:28:33 +01:00
Rui Matos
b192ad1300 gdk: Disable cogl wayland event dispatching if requested
If gdk event retrieval has been disabled and gdk's backend is wayland
we must also disable cogl's wayland event dispatching otherwise cogl
will try to dispatch wayland events itself which blocks the main
loop.

https://bugzilla.gnome.org/show_bug.cgi?id=744058
2015-02-05 18:31:44 +01:00
Lionel Landwerlin
c185d2187b gdk: report an error when initialization fails
https://bugzilla.gnome.org/show_bug.cgi?id=743355
2015-01-22 17:35:14 +00:00
Emmanuele Bassi
8859ed44e1 gdk: Support GdkWayland
We need to set up the Wayland display when using GDK and Wayland's
client-side API.
2015-01-12 17:48:04 +00:00
Adel Gadllah
cfcba18684 clutter-settings: Mark window-scaling-factor as fixed when set by the app
When an application sets the scaling factor manually we should mark it as fixed
and not override it when the xsettings change. This matches GDKs behaviour.

In order for this to work we cannot use the same path when setting the value
internally so introduce a _clutter_settings_set_property_internal and use it
for that.

https://bugzilla.gnome.org/show_bug.cgi?id=735244
2014-08-23 14:02:56 +02:00
Neil Roberts
0cef63b837 win32: Disable event retrieval in Cogl
Since commit 4543ed6ac3 in Cogl, Cogl will now try to consume
Windows message itself. This doesn't really cause any problems because
both message loops just call DispatchMessage which will cause the
message to be routed through Clutter's window procedure either way.
However, it's not great to have two sources listening for messages so
this patch disables Cogl's message retrieval.

https://bugzilla.gnome.org/show_bug.cgi?id=701356
2013-07-12 17:59:54 +01:00
Emmanuele Bassi
5a061ed4a3 gdk: Replace deprecated Cogl API 2013-07-03 18:35:44 +01:00
Damien Lespiau
3e479a3326 cogl: Don't use cogl_xlib_set_diplay()
This function is deprecated and has been replaced by set_display() on
the renderer. This is done in the get_renderer() vfunc of both the x11
and gdk backends already.

Actually cogl_xlib_set_diplay() is now a no-op and can be safely removed.

https://bugzilla.gnome.org/show_bug.cgi?id=687652
2013-02-20 23:06:28 +00:00
Emmanuele Bassi
fc04f015a6 gdk: Fix compilation on non-X11 platforms
The GDK backend may not work on non-X11 platforms, yet, but it's not a
good reason to let it introduce random build breakage.
2012-07-29 13:39:13 +01:00
Chun-wei Fan
ef1860d71d Bug 676150 GDK: Fix build on Windows
-Don't include unistd.h and stdint.h unconditionally as not all Windows
 compilers have them around.
-Only include cogl/cogl-xlib.h when it is really supported by Cogl and GDK.
-sys/ioctl.h is not available on Windows (MinGW/MSVC).
-Correct the call to cogl_renderer_set_winsys_id:
 (backend_cogl->cogl_renderer, COGL_WINSYS_ID_WGL) ->
 (renderer, COGL_WINSYS_ID_WGL)
2012-05-21 23:01:23 +08:00
Emmanuele Bassi
39a75436bf docs: Documentation fixes 2012-02-23 12:01:11 +00:00
Emmanuele Bassi
17c89bd0a0 backend: Clean up the device manager creation
Create the device manager during the event initialization, where it
makes sense.

This allows us to get rid of the per-backend get_device_manager()
virtual function, and just store the DeviceManager pointer into the
ClutterBackend structure.
2011-11-10 14:55:03 +00:00
Emmanuele Bassi
cd1e8da07f */backend: Clean up the stage creation
Use the default implementation of create_stage() wherever possible.
2011-11-10 14:55:03 +00:00
Emmanuele Bassi
f3c89e82b3 gdk/backend: Fix an invalid chain up 2011-11-10 14:55:03 +00:00
Emmanuele Bassi
b980d2dc17 */backend: Store the StageWindow implementation type 2011-11-10 14:55:03 +00:00
Emmanuele Bassi
5c9cafb411 cogl/backend: Remove the ClutterBackendCogl class
All the functionality that ClutterBackendCogl provided has been moved
into ClutterBackend itself, so there is no need to have this class
around in the source.

Cogl-based backends can derive directly from ClutterBackend.
2011-11-10 14:55:03 +00:00
Emmanuele Bassi
80fdbeb954 backend: Provide a default get_features() implementation
Continue gutting ClutterBackendCogl; get_features() is the last bit that
still does something, but now we can use the Cogl API.
2011-11-10 14:42:41 +00:00
Emmanuele Bassi
6ec7a28802 gdk/backend: Use the context creation hooks
Same as it has happened to the X11 backend.
2011-11-10 14:42:41 +00:00
Emmanuele Bassi
adb6ffbd0e backend: Unify the event initialization
Input backends are, in some cases, independent from the windowing system
backends; we can initialize input handling using a model similar to what
we use for windowing backends, including an environment variable and
compile-/run-time checks.

This model allows us to remove the backend-specific init_events(), and
use a generic implementation directly inside the base ClutterBackend
class, thus further reducing the backend-specific code that every
platform has to implement.

This requires some minor surgery to every single backend, to make sure
that the function exposed to initialize the event loop is similar and
performs roughly the same operations.
2011-11-10 14:42:40 +00:00
Emmanuele Bassi
f14cbf5bdb gdk: Allow disabling event retrieval
Just like the other backends can disable the internal event handling,
and use clutter_<backend>_handle_event() to do the native → Clutter
event translation.
2011-11-03 13:45:19 +00:00
Emmanuele Bassi
a09bbffd92 Implement multi-backend support
The Clutter backend split is opaque enough that should allow us to just
build all possible backends inside the same shared object, and select
the wanted backend at initialization time.

This requires some work in the build system, as well as the
initialization code, to remove duplicate functions that might cause
conflicts at build and link time. We also need to defer all the checks
of the internal state of the platform-specific API to run-time type
checks.
2011-11-03 13:45:19 +00:00
Giovanni Campagna
9c102b7c51 Rework the interaction between the Cogl and GDK / X11 backends.
Previously, the Cogl backend was at times a subclass of the X11
backend, and at times a standalone one. Now it is the other way
round, with GDK and X11 backends providing the concrete classes,
layered on top of the generic Cogl backend. A new EglNative backend
was introduced for direct to framebuffer rendering. This greatly
simplifies the API design (at the expense of some casts needed)
and reduces the amount of #ifdefs, without duplicating code.

https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-11-03 13:45:17 +00:00
Giovanni Campagna
610a9c17ba Add a new GDK backend
This commit introduces a new flavour for Clutter, that uses GDK
for handling all window system specific interactions (except for
creating the cogl context, as cogl does not know about GDK), including
in particular events. This is not compatible with the X11 (glx)
flavour, and this is reflected by the different soname (libclutter-gdk-1.0.so),
as all X11 specific functions and classes are not available. If you
wish to be compatible, you should check for CLUTTER_WINDOWING_X11.
Other than that, this backend should be on feature parity with X11,
including XInput 2, XSettings and EMWH (with much, much less code)

https://bugzilla.gnome.org/show_bug.cgi?id=657434
2011-11-03 13:42:13 +00:00