diff --git a/gdk/x11/gdkinput-x11.c b/gdk/x11/gdkinput-x11.c
index a793a42..eeda390 100644
--- a/gdk/x11/gdkinput-x11.c
+++ b/gdk/x11/gdkinput-x11.c
@@ -454,11 +454,18 @@ gdk_input_translate_coordinates (GdkDevicePrivate *gdkdev,
 
   if (gdkdev->info.mode == GDK_MODE_SCREEN)
     {
-      x_scale = gdk_screen_get_width (gdk_drawable_get_screen (window)) / device_width;
-      y_scale = gdk_screen_get_height (gdk_drawable_get_screen (window)) / device_height;
-
-      x_offset = - impl_window->input_window->root_x - priv->abs_x;
-      y_offset = - impl_window->input_window->root_y - priv->abs_y;
+      int core_pointer_x, core_pointer_y, cur_monitor;
+      GdkRectangle mon_geometry;
+      GdkScreen *cur_screen;
+      gdk_display_get_pointer (gdk_drawable_get_display (window), &cur_screen, &core_pointer_x, &core_pointer_y, 0);
+      cur_monitor = gdk_screen_get_monitor_at_point (cur_screen, core_pointer_x, core_pointer_y);
+
+      gdk_screen_get_monitor_geometry (cur_screen, cur_monitor, &mon_geometry);
+      x_scale = mon_geometry.width / device_width;
+      y_scale = mon_geometry.height / device_height;
+
+      x_offset = - impl_window->input_window->root_x - priv->abs_x + mon_geometry.x;
+      y_offset = - impl_window->input_window->root_y - priv->abs_y + mon_geometry.y;
     }
   else				/* GDK_MODE_WINDOW */
     {
