[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 05/19] ui/dbus: fix compilation when GBM && !OPENGL
From: |
marcandre . lureau |
Subject: |
[PULL 05/19] ui/dbus: fix compilation when GBM && !OPENGL |
Date: |
Sun, 28 May 2023 17:20:02 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
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>
---
ui/dbus-listener.c | 10 +++++-----
1 file 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;
}
--
2.40.1
- [PULL 00/19] Ui patches, marcandre . lureau, 2023/05/28
- [PULL 01/19] ui/gtk: fix passing y0_top parameter to scanout, marcandre . lureau, 2023/05/28
- [PULL 03/19] ui/gtk-egl: fix scaling for cursor position in scanout mode, marcandre . lureau, 2023/05/28
- [PULL 02/19] ui/gtk: use widget size for cursor motion event, marcandre . lureau, 2023/05/28
- [PULL 04/19] ui/sdl2: fix surface_gl_update_texture: Assertion 'gls' failed, marcandre . lureau, 2023/05/28
- [PULL 05/19] ui/dbus: fix compilation when GBM && !OPENGL,
marcandre . lureau <=
- [PULL 06/19] win32: wrap socket close() with an exception handler, marcandre . lureau, 2023/05/28
- [PULL 07/19] virtio-gpu: add a FIXME for virtio_gpu_load(), marcandre . lureau, 2023/05/28
- [PULL 08/19] gtk: add gl-area support on win32, marcandre . lureau, 2023/05/28
- [PULL 09/19] ui/dbus: add a FIXME about texture/dmabuf scanout handling, marcandre . lureau, 2023/05/28
- [PULL 10/19] ui/sdl2: Grab Alt+Tab also in fullscreen mode, marcandre . lureau, 2023/05/28
- [PULL 11/19] ui/sdl2: Grab Alt+F4 also under Windows, marcandre . lureau, 2023/05/28
- [PULL 12/19] ui/sdl2: disable SDL_HINT_GRAB_KEYBOARD on Windows, marcandre . lureau, 2023/05/28
- [PULL 13/19] ui/cursor: make width/height unsigned 16-bit integer, marcandre . lureau, 2023/05/28
- [PULL 14/19] virtio-input: generalize virtio_input_key_config(), marcandre . lureau, 2023/05/28
- [PULL 15/19] ui: add the infrastructure to support MT events, marcandre . lureau, 2023/05/28