Bug 1115481 - Move 'window' variable declaration in the #ifdef it's used from. r=karlt
authorMike Hommey <mh+mozilla@glandium.org>
Thu, 25 Dec 2014 15:22:18 +0900
changeset 247425 a90291c04e5b5eb7d4862069c4b273ffda715197
parent 247424 30c89bc08ce5e09fb46009c78d1cf5ef985de6b2
child 247426 c139cf2e487d40a6edfac56c5f207c6c60a948c1
push id4489
push userraliiev@mozilla.com
push dateMon, 23 Feb 2015 15:17:55 +0000
treeherdermozilla-beta@fd7c3dc24146 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1115481
milestone37.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 1115481 - Move 'window' variable declaration in the #ifdef it's used from. r=karlt
testing/tools/screenshot/gdk-screenshot.cpp
--- a/testing/tools/screenshot/gdk-screenshot.cpp
+++ b/testing/tools/screenshot/gdk-screenshot.cpp
@@ -122,20 +122,20 @@ int main(int argc, char** argv)
     }
 
     fprintf(stderr, "User input has been idle for %lu seconds\n", info->idle / 1000);
 
     XFree(info);
   }
 #endif
 
-  GdkWindow* window = gdk_get_default_root_window();
   GdkPixbuf* screenshot = nullptr;
 // TODO GTK3
 #if (MOZ_WIDGET_GTK == 2)
+  GdkWindow* window = gdk_get_default_root_window();
   screenshot = gdk_pixbuf_get_from_drawable(nullptr, window, nullptr,
                                             0, 0, 0, 0,
                                             gdk_screen_width(),
                                             gdk_screen_height());
 #endif
   if (!screenshot) {
     fprintf(stderr, "%s: failed to create screenshot GdkPixbuf\n", argv[0]);
     return 1;