x11/wayland: fix screensaver suspension via D-Bus

b08b1bde introduced a subtle bug. Despite not using D-Bus types directly,
the code used the SDL_USE_LIBDBUS definition set by SDL_dbus.h to conditionally
compile calls SDL_DBus_ScreensaverTickle() and SDL_DBus_ScreensaverInhibit().
As a result, it still compiled without SDL_dbus.h included, but screensaver
suspension silently failed to work.

The D-Bus stuff could probably use some tweaks to be harder to accidentally
break, but for now just restore the header includes.
This commit is contained in:
Cameron Gutman 2021-08-08 23:27:08 -05:00
parent 773e1ba19f
commit 6ae227d011
2 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,7 @@
#include "wayland-util.h"
#include "../SDL_sysvideo.h"
#include "../../core/linux/SDL_dbus.h"
#include "../../core/linux/SDL_ime.h"
struct xkb_context;

View File

@ -56,6 +56,7 @@
#include <X11/extensions/xf86vmode.h>
#endif
#include "../../core/linux/SDL_dbus.h"
#include "../../core/linux/SDL_ime.h"
#include "SDL_x11dyn.h"