diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index 340d243..d3faa52 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -51,7 +51,12 @@ count_monitor (HMONITOR hmonitor,
 {
   gint *n = (gint *) data;
 
-  (*n)++;
+  if (hmonitor->dwFlags & MONITORINFOF_PRIMARY)
+    {
+      _gdk_primary_monitor = *n;
+    }
+
+  _gdk_num_monitors++;
 
   return TRUE;
 }
@@ -127,6 +132,7 @@ _gdk_monitor_init (void)
   gint i, index;
 
   _gdk_num_monitors = 0;
+  _gdk_primary_monitor = 0;
 
   EnumDisplayMonitors (NULL, NULL, count_monitor, (LPARAM) &_gdk_num_monitors);
 
diff --git a/gdk/win32/gdkglobals-win32.c b/gdk/win32/gdkglobals-win32.c
index d30ad32..4fea13e 100644
--- a/gdk/win32/gdkglobals-win32.c
+++ b/gdk/win32/gdkglobals-win32.c
@@ -34,6 +34,7 @@ GdkScreen	 *_gdk_screen = NULL;
 GdkWindow	 *_gdk_root = NULL;
 
 gint		  _gdk_num_monitors;
+gint              _gdk_primary_monitor;
 GdkWin32Monitor  *_gdk_monitors = NULL;
 
 gint		  _gdk_offset_x, _gdk_offset_y;
diff --git a/gdk/win32/gdkprivate-win32.h b/gdk/win32/gdkprivate-win32.h
index 26e5e7d..c828405 100644
--- a/gdk/win32/gdkprivate-win32.h
+++ b/gdk/win32/gdkprivate-win32.h
@@ -374,6 +374,7 @@ extern GdkDisplay       *_gdk_display;
 extern GdkScreen        *_gdk_screen;
 
 extern gint		 _gdk_num_monitors;
+extern gint              _gdk_primary_monitor;
 typedef struct _GdkWin32Monitor GdkWin32Monitor;
 struct _GdkWin32Monitor
 {
diff --git a/gdk/win32/gdkscreen-win32.c b/gdk/win32/gdkscreen-win32.c
index 73eb93e..fe6ef4c 100644
--- a/gdk/win32/gdkscreen-win32.c
+++ b/gdk/win32/gdkscreen-win32.c
@@ -67,6 +67,14 @@ gdk_screen_get_n_monitors (GdkScreen *screen)
 }
 
 gint
+gdk_screen_get_primary_monitor (GdkScreen *screen)
+{
+  g_return_val_if_fail (screen == _gdk_screen, 0);
+
+  return _gdk_primary_monitor;
+}
+
+gint
 gdk_screen_get_monitor_width_mm (GdkScreen *screen,
                                  gint       num_monitor)
 {
