cally-actor: Don't assume X11 backend is used when supported
_cally_actor_get_top_level_origin() uses a compile time check without runtime check, which will obviously fail when another backend like wayland is used. https://bugzilla.gnome.org/show_bug.cgi?id=746575
This commit is contained in:
parent
fc5fe98c3f
commit
38c4807230
@ -74,7 +74,7 @@
|
|||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
|
|
||||||
#ifdef HAVE_CLUTTER_GLX
|
#ifdef CLUTTER_WINDOWING_X11
|
||||||
#include <clutter/x11/clutter-x11.h>
|
#include <clutter/x11/clutter-x11.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -754,7 +754,8 @@ _cally_actor_get_top_level_origin (ClutterActor *actor,
|
|||||||
gint x = 0;
|
gint x = 0;
|
||||||
gint y = 0;
|
gint y = 0;
|
||||||
|
|
||||||
#ifdef HAVE_CLUTTER_GLX
|
#ifdef CLUTTER_WINDOWING_X11
|
||||||
|
if (clutter_check_windowing_backend (CLUTTER_WINDOWING_X11))
|
||||||
{
|
{
|
||||||
ClutterActor *stage = NULL;
|
ClutterActor *stage = NULL;
|
||||||
Display *display = NULL;
|
Display *display = NULL;
|
||||||
@ -779,6 +780,7 @@ _cally_actor_get_top_level_origin (ClutterActor *actor,
|
|||||||
g_warning ("[x11] We were not able to get proper absolute "
|
g_warning ("[x11] We were not able to get proper absolute "
|
||||||
"position of the stage");
|
"position of the stage");
|
||||||
}
|
}
|
||||||
|
else
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
static gboolean yet_warned = FALSE;
|
static gboolean yet_warned = FALSE;
|
||||||
@ -787,9 +789,8 @@ _cally_actor_get_top_level_origin (ClutterActor *actor,
|
|||||||
{
|
{
|
||||||
yet_warned = TRUE;
|
yet_warned = TRUE;
|
||||||
|
|
||||||
g_warning ("Using a clutter backend not supported. "
|
g_warning ("The current Clutter backend does not support using "
|
||||||
"atk_component_get_extents using ATK_XY_SCREEN "
|
"atk_component_get_extents() with ATK_XY_SCREEN.");
|
||||||
"could return a wrong screen position");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user