src/core/linux/SDL_dbus.c
changeset 12921 5959fcbe6dfe
parent 12920 3505a39d5aa6
equal deleted inserted replaced
12920:3505a39d5aa6 12921:5959fcbe6dfe
   308 
   308 
   309 
   309 
   310 void
   310 void
   311 SDL_DBus_ScreensaverTickle(void)
   311 SDL_DBus_ScreensaverTickle(void)
   312 {
   312 {
   313     /* org.gnome.ScreenSaver is the legacy interface, but it'll either do nothing or just be a second harmless tickle on newer systems, so we leave it for now. */
   313     if (screensaver_cookie == 0) {  /* no need to tickle if we're inhibiting. */
   314     SDL_DBus_CallVoidMethod("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID);
   314         /* org.gnome.ScreenSaver is the legacy interface, but it'll either do nothing or just be a second harmless tickle on newer systems, so we leave it for now. */
   315     SDL_DBus_CallVoidMethod("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID);
   315         SDL_DBus_CallVoidMethod("org.gnome.ScreenSaver", "/org/gnome/ScreenSaver", "org.gnome.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID);
       
   316         SDL_DBus_CallVoidMethod("org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", "org.freedesktop.ScreenSaver", "SimulateUserActivity", DBUS_TYPE_INVALID);
       
   317     }
   316 }
   318 }
   317 
   319 
   318 SDL_bool
   320 SDL_bool
   319 SDL_DBus_ScreensaverInhibit(SDL_bool inhibit)
   321 SDL_DBus_ScreensaverInhibit(SDL_bool inhibit)
   320 {
   322 {