mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 08:00:42 -05:00
clutter/backend/x11: Clean up ClutterBackend variable naming
Just as with MetaClutterBackendX11, lets avoid confusing it with MetaBackend. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2002>
This commit is contained in:
parent
bbf2f6e064
commit
08c34c887f
@ -86,11 +86,12 @@ cogl_xlib_filter (XEvent *xevent,
|
|||||||
ClutterEvent *event,
|
ClutterEvent *event,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
ClutterBackend *backend = data;
|
ClutterBackend *clutter_backend = data;
|
||||||
MetaX11FilterReturn retval;
|
MetaX11FilterReturn retval;
|
||||||
CoglFilterReturn ret;
|
CoglFilterReturn ret;
|
||||||
|
|
||||||
ret = cogl_xlib_renderer_handle_event (backend->cogl_renderer, xevent);
|
ret = cogl_xlib_renderer_handle_event (clutter_backend->cogl_renderer,
|
||||||
|
xevent);
|
||||||
switch (ret)
|
switch (ret)
|
||||||
{
|
{
|
||||||
case COGL_FILTER_REMOVE:
|
case COGL_FILTER_REMOVE:
|
||||||
@ -107,10 +108,11 @@ cogl_xlib_filter (XEvent *xevent,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_clutter_backend_x11_finish_init (ClutterBackend *backend,
|
meta_clutter_backend_x11_finish_init (ClutterBackend *clutter_backend,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
MetaClutterBackendX11 *clutter_backend_x11 = META_CLUTTER_BACKEND_X11 (backend);
|
MetaClutterBackendX11 *clutter_backend_x11 =
|
||||||
|
META_CLUTTER_BACKEND_X11 (clutter_backend);
|
||||||
Atom atoms[N_ATOM_NAMES];
|
Atom atoms[N_ATOM_NAMES];
|
||||||
|
|
||||||
if (_foreign_dpy)
|
if (_foreign_dpy)
|
||||||
@ -153,7 +155,7 @@ meta_clutter_backend_x11_finish_init (ClutterBackend *backend,
|
|||||||
g_debug ("Getting the X screen");
|
g_debug ("Getting the X screen");
|
||||||
|
|
||||||
/* add event filter for Cogl events */
|
/* add event filter for Cogl events */
|
||||||
meta_clutter_x11_add_filter (cogl_xlib_filter, backend);
|
meta_clutter_x11_add_filter (cogl_xlib_filter, clutter_backend);
|
||||||
|
|
||||||
clutter_backend_x11->xscreen = DefaultScreenOfDisplay (clutter_backend_x11->xdisplay);
|
clutter_backend_x11->xscreen = DefaultScreenOfDisplay (clutter_backend_x11->xdisplay);
|
||||||
clutter_backend_x11->xscreen_num = XScreenNumberOfScreen (clutter_backend_x11->xscreen);
|
clutter_backend_x11->xscreen_num = XScreenNumberOfScreen (clutter_backend_x11->xscreen);
|
||||||
@ -186,7 +188,7 @@ meta_clutter_backend_x11_finish_init (ClutterBackend *backend,
|
|||||||
clutter_backend_x11->xdisplay,
|
clutter_backend_x11->xdisplay,
|
||||||
clutter_backend_x11->xscreen_num,
|
clutter_backend_x11->xscreen_num,
|
||||||
(unsigned int) clutter_backend_x11->xwin_root,
|
(unsigned int) clutter_backend_x11->xwin_root,
|
||||||
clutter_backend_get_resolution (backend));
|
clutter_backend_get_resolution (clutter_backend));
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@ -204,12 +206,13 @@ meta_clutter_backend_x11_finalize (GObject *gobject)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static ClutterFeatureFlags
|
static ClutterFeatureFlags
|
||||||
meta_clutter_backend_x11_get_features (ClutterBackend *backend)
|
meta_clutter_backend_x11_get_features (ClutterBackend *clutter_backend)
|
||||||
{
|
{
|
||||||
|
ClutterBackendClass *parent_class =
|
||||||
|
CLUTTER_BACKEND_CLASS (meta_clutter_backend_x11_parent_class);
|
||||||
ClutterFeatureFlags flags = CLUTTER_FEATURE_STAGE_CURSOR;
|
ClutterFeatureFlags flags = CLUTTER_FEATURE_STAGE_CURSOR;
|
||||||
|
|
||||||
flags |=
|
flags |= parent_class->get_features (clutter_backend);
|
||||||
CLUTTER_BACKEND_CLASS (meta_clutter_backend_x11_parent_class)->get_features (backend);
|
|
||||||
|
|
||||||
return flags;
|
return flags;
|
||||||
}
|
}
|
||||||
@ -300,7 +303,7 @@ check_onscreen_template (CoglRenderer *renderer,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static CoglDisplay *
|
static CoglDisplay *
|
||||||
meta_clutter_backend_x11_get_display (ClutterBackend *backend,
|
meta_clutter_backend_x11_get_display (ClutterBackend *clutter_backend,
|
||||||
CoglRenderer *renderer,
|
CoglRenderer *renderer,
|
||||||
CoglSwapChain *swap_chain,
|
CoglSwapChain *swap_chain,
|
||||||
GError **error)
|
GError **error)
|
||||||
@ -341,7 +344,7 @@ meta_clutter_backend_x11_get_renderer (ClutterBackend *clutter_backend,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static ClutterStageWindow *
|
static ClutterStageWindow *
|
||||||
meta_clutter_backend_x11_create_stage (ClutterBackend *backend,
|
meta_clutter_backend_x11_create_stage (ClutterBackend *clutter_backend,
|
||||||
ClutterStage *wrapper,
|
ClutterStage *wrapper,
|
||||||
GError **error)
|
GError **error)
|
||||||
{
|
{
|
||||||
@ -354,7 +357,7 @@ meta_clutter_backend_x11_create_stage (ClutterBackend *backend,
|
|||||||
stage_type = META_TYPE_STAGE_X11;
|
stage_type = META_TYPE_STAGE_X11;
|
||||||
|
|
||||||
stage = g_object_new (stage_type,
|
stage = g_object_new (stage_type,
|
||||||
"backend", backend,
|
"backend", clutter_backend,
|
||||||
"wrapper", wrapper,
|
"wrapper", wrapper,
|
||||||
NULL);
|
NULL);
|
||||||
return stage;
|
return stage;
|
||||||
@ -440,7 +443,7 @@ meta_clutter_backend_x11_get_default_seat (ClutterBackend *clutter_backend)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
meta_clutter_backend_x11_is_display_server (ClutterBackend *backend)
|
meta_clutter_backend_x11_is_display_server (ClutterBackend *clutter_backend)
|
||||||
{
|
{
|
||||||
return meta_is_wayland_compositor ();
|
return meta_is_wayland_compositor ();
|
||||||
}
|
}
|
||||||
@ -496,21 +499,21 @@ meta_clutter_x11_untrap_x_errors (void)
|
|||||||
Display *
|
Display *
|
||||||
meta_clutter_x11_get_default_display (void)
|
meta_clutter_x11_get_default_display (void)
|
||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||||
|
|
||||||
if (backend == NULL)
|
if (clutter_backend == NULL)
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend has not been initialised");
|
g_critical ("The Clutter backend has not been initialised");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!META_IS_CLUTTER_BACKEND_X11 (backend))
|
if (!META_IS_CLUTTER_BACKEND_X11 (clutter_backend))
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend is not a X11 backend");
|
g_critical ("The Clutter backend is not a X11 backend");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
return META_CLUTTER_BACKEND_X11 (backend)->xdisplay;
|
return META_CLUTTER_BACKEND_X11 (clutter_backend)->xdisplay;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -529,41 +532,41 @@ meta_clutter_x11_set_display (Display *xdisplay)
|
|||||||
int
|
int
|
||||||
meta_clutter_x11_get_default_screen (void)
|
meta_clutter_x11_get_default_screen (void)
|
||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||||
|
|
||||||
if (backend == NULL)
|
if (clutter_backend == NULL)
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend has not been initialised");
|
g_critical ("The Clutter backend has not been initialised");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!META_IS_CLUTTER_BACKEND_X11 (backend))
|
if (!META_IS_CLUTTER_BACKEND_X11 (clutter_backend))
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend is not a X11 backend");
|
g_critical ("The Clutter backend is not a X11 backend");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return META_CLUTTER_BACKEND_X11 (backend)->xscreen_num;
|
return META_CLUTTER_BACKEND_X11 (clutter_backend)->xscreen_num;
|
||||||
}
|
}
|
||||||
|
|
||||||
Window
|
Window
|
||||||
meta_clutter_x11_get_root_window (void)
|
meta_clutter_x11_get_root_window (void)
|
||||||
{
|
{
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||||
|
|
||||||
if (backend == NULL)
|
if (clutter_backend == NULL)
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend has not been initialised");
|
g_critical ("The Clutter backend has not been initialised");
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!META_IS_CLUTTER_BACKEND_X11 (backend))
|
if (!META_IS_CLUTTER_BACKEND_X11 (clutter_backend))
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend is not a X11 backend");
|
g_critical ("The Clutter backend is not a X11 backend");
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
return META_CLUTTER_BACKEND_X11 (backend)->xwin_root;
|
return META_CLUTTER_BACKEND_X11 (clutter_backend)->xwin_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -571,24 +574,24 @@ meta_clutter_x11_add_filter (MetaX11FilterFunc func,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
MetaX11EventFilter *filter;
|
MetaX11EventFilter *filter;
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||||
MetaClutterBackendX11 *clutter_backend_x11;
|
MetaClutterBackendX11 *clutter_backend_x11;
|
||||||
|
|
||||||
g_return_if_fail (func != NULL);
|
g_return_if_fail (func != NULL);
|
||||||
|
|
||||||
if (backend == NULL)
|
if (clutter_backend == NULL)
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend has not been initialised");
|
g_critical ("The Clutter backend has not been initialised");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!META_IS_CLUTTER_BACKEND_X11 (backend))
|
if (!META_IS_CLUTTER_BACKEND_X11 (clutter_backend))
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend is not a X11 backend");
|
g_critical ("The Clutter backend is not a X11 backend");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_backend_x11 = META_CLUTTER_BACKEND_X11 (backend);
|
clutter_backend_x11 = META_CLUTTER_BACKEND_X11 (clutter_backend);
|
||||||
|
|
||||||
filter = g_new0 (MetaX11EventFilter, 1);
|
filter = g_new0 (MetaX11EventFilter, 1);
|
||||||
filter->func = func;
|
filter->func = func;
|
||||||
@ -606,24 +609,24 @@ meta_clutter_x11_remove_filter (MetaX11FilterFunc func,
|
|||||||
{
|
{
|
||||||
GSList *tmp_list, *this;
|
GSList *tmp_list, *this;
|
||||||
MetaX11EventFilter *filter;
|
MetaX11EventFilter *filter;
|
||||||
ClutterBackend *backend = clutter_get_default_backend ();
|
ClutterBackend *clutter_backend = clutter_get_default_backend ();
|
||||||
MetaClutterBackendX11 *clutter_backend_x11;
|
MetaClutterBackendX11 *clutter_backend_x11;
|
||||||
|
|
||||||
g_return_if_fail (func != NULL);
|
g_return_if_fail (func != NULL);
|
||||||
|
|
||||||
if (backend == NULL)
|
if (clutter_backend == NULL)
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend has not been initialised");
|
g_critical ("The Clutter backend has not been initialised");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!META_IS_CLUTTER_BACKEND_X11 (backend))
|
if (!META_IS_CLUTTER_BACKEND_X11 (clutter_backend))
|
||||||
{
|
{
|
||||||
g_critical ("The Clutter backend is not a X11 backend");
|
g_critical ("The Clutter backend is not a X11 backend");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
clutter_backend_x11 = META_CLUTTER_BACKEND_X11 (backend);
|
clutter_backend_x11 = META_CLUTTER_BACKEND_X11 (clutter_backend);
|
||||||
|
|
||||||
tmp_list = clutter_backend_x11->event_filters;
|
tmp_list = clutter_backend_x11->event_filters;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user