Bug 1173520 - Fix build on Gtk3. r=karlt
authorHubert Figuière <hfiguiere@mozilla.com>
Thu, 11 Jun 2015 23:21:31 -0400
changeset 248559 531968412cf7724680da19de9ad1de51330623cc
parent 248558 2b0227bff5a0b2c6eaf80a0821a147953d06e344
child 248560 ad85daa487cf4ebd83a8e224218ddbd7894fe62a
push id61005
push userhfiguiere@mozilla.com
push dateFri, 12 Jun 2015 15:05:40 +0000
treeherdermozilla-inbound@531968412cf7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1173520
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1173520 - Fix build on Gtk3. r=karlt
testing/tools/screenshot/gdk-screenshot.cpp
--- a/testing/tools/screenshot/gdk-screenshot.cpp
+++ b/testing/tools/screenshot/gdk-screenshot.cpp
@@ -58,27 +58,29 @@ gboolean save_to_stdout(const gchar *buf
 
 int main(int argc, char** argv)
 {
   gdk_init(&argc, &argv);
 
 #if defined(HAVE_LIBXSS) && defined(MOZ_WIDGET_GTK)
   int event_base, error_base;
   Bool have_xscreensaver =
-    XScreenSaverQueryExtension(GDK_DISPLAY(), &event_base, &error_base);
+    XScreenSaverQueryExtension(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()),
+                               &event_base, &error_base);
 
   if (!have_xscreensaver) {
     fprintf(stderr, "No XScreenSaver extension on display\n");
   } else {
     XScreenSaverInfo* info = XScreenSaverAllocInfo();
     if (!info) {
       fprintf(stderr, "%s: Out of memory\n", argv[0]);
       return 1;
     }
-    XScreenSaverQueryInfo(GDK_DISPLAY(), GDK_ROOT_WINDOW(), info);
+    XScreenSaverQueryInfo(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()),
+                          GDK_ROOT_WINDOW(), info);
 
     const char* state;
     const char* til_or_since = nullptr;
     switch (info->state) {
     case ScreenSaverOff:
       state = "Off";
       til_or_since = "XScreenSaver will activate after another %lu seconds idle time\n";
       break;