 libgimpwidgets/gimppickbutton-default.c | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/libgimpwidgets/gimppickbutton-default.c b/libgimpwidgets/gimppickbutton-default.c
index 3fec04a15a..4b5bcf657a 100644
--- a/libgimpwidgets/gimppickbutton-default.c
+++ b/libgimpwidgets/gimppickbutton-default.c
@@ -22,6 +22,11 @@
 #include <gtk/gtk.h>
 #include <gdk/gdkkeysyms.h>
 
+#ifdef G_OS_WIN32
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#endif
+
 #include "libgimpcolor/gimpcolor.h"
 
 #include "gimpwidgetstypes.h"
@@ -199,15 +204,36 @@ gimp_pick_button_pick (GdkScreen      *screen,
                        gint            y_root,
                        GimpPickButton *button)
 {
+#ifdef G_OS_WIN32
+  HDC               hdc;
+  RECT              rect;
+  COLORREF          win32_color;
+#else
   GdkWindow        *root_window = gdk_screen_get_root_window (screen);
   cairo_surface_t  *image;
   cairo_t          *cr;
   guchar           *data;
   guchar            color[3];
+#endif
   GimpRGB           rgb;
   GimpColorProfile *monitor_profile;
   gint              monitor;
 
+#ifdef G_OS_WIN32
+
+  // For MS Windows, use native GDI functions to get the pixel, as cairo does not handle the case where you have multiple monitors
+  // with a monitor on the left or above the primary monitor.  That scenario create a cairo primary surface with negative extent,
+  // which is not handled properly (bug 740634).
+
+  hdc = GetDC(HWND_DESKTOP);
+  GetClipBox(hdc, &rect);
+  win32_color = GetPixel(hdc, x_root + rect.left, y_root + rect.top);
+  DeleteDC(hdc);
+
+  gimp_rgba_set_uchar (&rgb, GetRValue(win32_color), GetGValue(win32_color), GetBValue(win32_color), 255);
+
+#else
+
   image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, 1, 1);
 
   cr = cairo_create (image);
@@ -224,6 +250,8 @@ gimp_pick_button_pick (GdkScreen      *screen,
 
   gimp_rgba_set_uchar (&rgb, color[0], color[1], color[2], 255);
 
+#endif
+
   monitor = gdk_screen_get_monitor_at_point (screen, x_root, y_root);
   monitor_profile = gimp_screen_get_color_profile (screen, monitor);
 

