diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-05-15 17:23:48 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-05-28 13:08:25 +0400 |
commit | 0b31e48d62c8f3a282d1bffbcc0e90200df9f9f0 (patch) | |
tree | a95eb7b74fd80cab927fb775c4d7f83d00a978ed /ui | |
parent | b3a654d82ecf276b59a67b2fd688e11a0d8a0064 (diff) |
ui/dbus: fix compilation when GBM && !OPENGL
commit 4814d3cbf ("ui/dbus: restrict opengl to gbm-enabled config")
assumes that whenever GBM is available, OpenGL is. This is not always
the case, let's further restrict opengl-related paths and fix some
compilation issues.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20230515132348.1024663-1-marcandre.lureau@redhat.com>
Diffstat (limited to 'ui')
-rw-r--r-- | ui/dbus-listener.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/dbus-listener.c b/ui/dbus-listener.c index 911acdc529..defe2220c0 100644 --- a/ui/dbus-listener.c +++ b/ui/dbus-listener.c @@ -50,7 +50,7 @@ struct _DBusDisplayListener { G_DEFINE_TYPE(DBusDisplayListener, dbus_display_listener, G_TYPE_OBJECT) -#ifdef CONFIG_GBM +#if defined(CONFIG_OPENGL) && defined(CONFIG_GBM) static void dbus_update_gl_cb(GObject *source_object, GAsyncResult *res, gpointer user_data) @@ -239,7 +239,7 @@ static void dbus_refresh(DisplayChangeListener *dcl) graphic_hw_update(dcl->con); } -#ifdef CONFIG_GBM +#if defined(CONFIG_OPENGL) && defined(CONFIG_GBM) static void dbus_gl_gfx_update(DisplayChangeListener *dcl, int x, int y, int w, int h) { @@ -302,7 +302,7 @@ static void dbus_gfx_update(DisplayChangeListener *dcl, DBUS_DEFAULT_TIMEOUT, NULL, NULL, NULL); } -#ifdef CONFIG_GBM +#if defined(CONFIG_OPENGL) && defined(CONFIG_GBM) static void dbus_gl_gfx_switch(DisplayChangeListener *dcl, struct DisplaySurface *new_surface) { @@ -369,7 +369,7 @@ static void dbus_cursor_define(DisplayChangeListener *dcl, NULL); } -#ifdef CONFIG_GBM +#if defined(CONFIG_OPENGL) && defined(CONFIG_GBM) const DisplayChangeListenerOps dbus_gl_dcl_ops = { .dpy_name = "dbus-gl", .dpy_gfx_update = dbus_gl_gfx_update, @@ -417,7 +417,7 @@ dbus_display_listener_constructed(GObject *object) DBusDisplayListener *ddl = DBUS_DISPLAY_LISTENER(object); ddl->dcl.ops = &dbus_dcl_ops; -#ifdef CONFIG_GBM +#if defined(CONFIG_OPENGL) && defined(CONFIG_GBM) if (display_opengl) { ddl->dcl.ops = &dbus_gl_dcl_ops; } |