diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index 0727a36..787d0d0 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -1737,7 +1737,7 @@ gtk_combo_box_menu_position_below (GtkMenu  *menu,
   screen = gtk_widget_get_screen (GTK_WIDGET (combo_box));
   monitor_num = gdk_screen_get_monitor_at_window (screen,
                                                   gtk_widget_get_window (GTK_WIDGET (combo_box)));
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   if (*x < monitor.x)
     *x = monitor.x;
@@ -1936,7 +1936,7 @@ gtk_combo_box_list_position (GtkComboBox *combo_box,
 
   screen = gtk_widget_get_screen (GTK_WIDGET (combo_box));
   monitor_num = gdk_screen_get_monitor_at_window (screen, window);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   if (gtk_widget_get_direction (GTK_WIDGET (combo_box)) == GTK_TEXT_DIR_RTL)
     *x = *x + allocation.width - *width;
diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c
index 886f59a..24a59fb 100644
--- a/gtk/gtkentry.c
+++ b/gtk/gtkentry.c
@@ -8633,7 +8633,7 @@ popup_position_func (GtkMenu   *menu,
     monitor_num = 0;
   gtk_menu_set_monitor (menu, monitor_num);
 
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
   gtk_widget_get_preferred_size (priv->popup_menu,
                                  &menu_req, NULL);
   height = gdk_window_get_height (priv->text_area);
diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c
index b770fa9..0ba7d1f 100644
--- a/gtk/gtkentrycompletion.c
+++ b/gtk/gtkentrycompletion.c
@@ -1508,7 +1508,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
 
   screen = gtk_widget_get_screen (GTK_WIDGET (completion->priv->entry));
   monitor_num = gdk_screen_get_monitor_at_window (screen, window);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
 
 
diff --git a/gtk/gtkfilechooserdefault.c b/gtk/gtkfilechooserdefault.c
index 57d0514..194c111 100644
--- a/gtk/gtkfilechooserdefault.c
+++ b/gtk/gtkfilechooserdefault.c
@@ -4189,7 +4189,7 @@ popup_position_func (GtkMenu   *menu,
 
   monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
   gtk_menu_set_monitor (menu, monitor_num);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   *x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width));
   *y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height));
diff --git a/gtk/gtklinkbutton.c b/gtk/gtklinkbutton.c
index 2c76ade..8976c05 100644
--- a/gtk/gtklinkbutton.c
+++ b/gtk/gtklinkbutton.c
@@ -63,6 +63,7 @@
 #include "gtkstock.h"
 #include "gtkshow.h"
 #include "gtktooltip.h"
+#include "gtkprivate.h"
 
 #include "gtkintl.h"
 
@@ -428,7 +429,7 @@ popup_position_func (GtkMenu  *menu,
 
   monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
   gtk_menu_set_monitor (menu, monitor_num);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   *x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width));
   *y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height));
diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c
index dee69b8..a3ba645 100644
--- a/gtk/gtkmenu.c
+++ b/gtk/gtkmenu.c
@@ -113,6 +113,11 @@
 #include "gtkintl.h"
 #include "gtktypebuiltins.h"
 
+#ifdef GDK_WINDOWING_X11
+#include <gdk/gdkx.h>
+#include <X11/Xatom.h>
+#endif
+
 #define NAVIGATION_REGION_OVERSHOOT 50  /* How much the navigation region
                                          * extends below the submenu
                                          */
@@ -3338,7 +3343,7 @@ gtk_menu_get_preferred_height_for_width (GtkWidget *widget,
       GdkScreen *screen = gtk_widget_get_screen (priv->toplevel);
       GdkRectangle monitor;
 
-      gdk_screen_get_monitor_geometry (screen, priv->monitor_num, &monitor);
+      _gdk_screen_get_monitor_workarea(screen, priv->monitor_num, &monitor);
 
       if (priv->position_y + min_height > monitor.y + monitor.height)
         min_height = monitor.y + monitor.height - priv->position_y;
@@ -4657,6 +4662,129 @@ gtk_menu_deactivate (GtkMenuShell *menu_shell)
     gtk_menu_shell_deactivate (GTK_MENU_SHELL (parent));
 }
 
+#ifdef GDK_WINDOWING_X11
+static int
+get_current_desktop (GdkScreen *screen)
+{
+  Display *display;
+  Window win;
+  Atom current_desktop, type;
+  int format;
+  unsigned long n_items, bytes_after;
+  unsigned char *data_return = NULL;
+  int workspace = 0;
+
+  display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
+  win = XRootWindow (display, GDK_SCREEN_XNUMBER (screen));
+
+  current_desktop = XInternAtom (display, "_NET_CURRENT_DESKTOP", True);
+
+  XGetWindowProperty (display,
+                      win,
+                      current_desktop,
+                      0, G_MAXLONG,
+                      False, XA_CARDINAL,
+                      &type, &format, &n_items, &bytes_after,
+                      &data_return);
+
+  if (type == XA_CARDINAL && format == 32 && n_items > 0)
+    workspace = (int) data_return[0];
+
+  if (data_return)
+    XFree (data_return);
+
+  return workspace;
+}
+
+static void
+get_work_area (GdkScreen    *screen,
+               GdkRectangle *area)
+{
+  Atom            workarea;
+  Atom            type;
+  Window          win;
+  int             format;
+  gulong          num;
+  gulong          leftovers;
+  gulong          max_len = 4 * 32;
+  guchar         *ret_workarea;
+  long           *workareas;
+  int             result;
+  int             disp_screen;
+  int             desktop;
+  Display        *display;
+
+  display = GDK_DISPLAY_XDISPLAY (gdk_screen_get_display (screen));
+  disp_screen = GDK_SCREEN_XNUMBER (screen);
+  workarea = XInternAtom (display, "_NET_WORKAREA", True);
+
+  /* Defaults in case of error */
+  area->x = 0;
+  area->y = 0;
+  area->width = gdk_screen_get_width (screen);
+  area->height = gdk_screen_get_height (screen);
+
+  if (workarea == None)
+    return;
+
+  win = XRootWindow (display, disp_screen);
+  result = XGetWindowProperty (display,
+                               win,
+                               workarea,
+                               0,
+                               max_len,
+                               False,
+                               AnyPropertyType,
+                               &type,
+                               &format,
+                               &num,
+                               &leftovers,
+                               &ret_workarea);
+
+  if (result != Success ||
+      type == None ||
+      format == 0 ||
+      leftovers ||
+      num % 4)
+    return;
+
+  desktop = get_current_desktop (screen);
+
+  workareas = (long *) ret_workarea;
+  area->x = workareas[desktop * 4];
+  area->y = workareas[desktop * 4 + 1];
+  area->width = workareas[desktop * 4 + 2];
+  area->height = workareas[desktop * 4 + 3];
+
+  XFree (ret_workarea);
+}
+
+#endif
+
+void
+_gdk_screen_get_monitor_workarea (GdkScreen    *screen,
+                                  gint          monitor_num,
+                                  GdkRectangle *monitor)
+{
+  GdkRectangle workarea;
+
+  gdk_screen_get_monitor_geometry (screen, monitor_num, monitor);
+
+#ifdef GDK_WINDOWING_X11
+  if (GDK_IS_X11_SCREEN (screen))
+    get_work_area (screen, &workarea);
+  else
+#endif
+    {
+      workarea.x = 0;
+      workarea.y = 0;
+      workarea.width = gdk_screen_get_width (screen);
+      workarea.height = gdk_screen_get_height (screen);
+    }
+
+  gdk_rectangle_intersect (&workarea, monitor, monitor);
+}
+
 static void
 gtk_menu_position (GtkMenu  *menu,
                    gboolean  set_scroll_offset)
@@ -4711,7 +4839,7 @@ gtk_menu_position (GtkMenu  *menu,
       if (priv->monitor_num < 0)
         priv->monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
 
-      gdk_screen_get_monitor_geometry (screen, priv->monitor_num, &monitor);
+      _gdk_screen_get_monitor_workarea (screen, priv->monitor_num, &monitor);
     }
   else
     {
@@ -4741,7 +4869,7 @@ gtk_menu_position (GtkMenu  *menu,
        * Positioning in the vertical direction is similar: first try below
        * mouse cursor, then above.
        */
-      gdk_screen_get_monitor_geometry (screen, priv->monitor_num, &monitor);
+      _gdk_screen_get_monitor_workarea (screen, priv->monitor_num, &monitor);
 
       space_left = x - monitor.x;
       space_right = monitor.x + monitor.width - x - 1;
diff --git a/gtk/gtkmenuitem.c b/gtk/gtkmenuitem.c
index 6194ee5..cdb6aeb 100644
--- a/gtk/gtkmenuitem.c
+++ b/gtk/gtkmenuitem.c
@@ -2054,7 +2054,7 @@ gtk_menu_item_position_menu (GtkMenu  *menu,
   monitor_num = gdk_screen_get_monitor_at_window (screen, priv->event_window);
   if (monitor_num < 0)
     monitor_num = 0;
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   if (!gdk_window_get_origin (gtk_widget_get_window (widget), &tx, &ty))
     {
diff --git a/gtk/gtkmenutoolbutton.c b/gtk/gtkmenutoolbutton.c
index e63d795..db1f156 100644
--- a/gtk/gtkmenutoolbutton.c
+++ b/gtk/gtkmenutoolbutton.c
@@ -292,7 +292,7 @@ menu_position_func (GtkMenu           *menu,
   monitor_num = gdk_screen_get_monitor_at_window (screen, window);
   if (monitor_num < 0)
     monitor_num = 0;
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   if (orientation == GTK_ORIENTATION_HORIZONTAL)
     {
diff --git a/gtk/gtkprivate.h b/gtk/gtkprivate.h
index 458a4b9..6ec9517 100644
--- a/gtk/gtkprivate.h
+++ b/gtk/gtkprivate.h
@@ -83,6 +83,10 @@ void    _gtk_modules_init             (gint          *argc,
 void    _gtk_modules_settings_changed (GtkSettings   *settings,
                                        const gchar   *modules);
 
+void    _gdk_screen_get_monitor_workarea (GdkScreen    *screen,
+                                          gint          monitor,
+                                          GdkRectangle *area);
+
 G_END_DECLS
 
 #endif /* __GTK_PRIVATE_H__ */
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index 84fe199..5151ec6 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -960,7 +960,7 @@ set_default_size (GtkRecentChooserDefault *impl)
   monitor_num = gdk_screen_get_monitor_at_window (screen,
                                                   gtk_widget_get_window (widget));
 
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   width = MIN (width, monitor.width * 3 / 4);
   height = MIN (height, monitor.height * 3 / 4);
@@ -1856,7 +1856,7 @@ popup_position_func (GtkMenu   *menu,
 
   monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
   gtk_menu_set_monitor (menu, monitor_num);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   *x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width));
   *y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height));
diff --git a/gtk/gtkscalebutton.c b/gtk/gtkscalebutton.c
index 7a62baf..558f95b 100644
--- a/gtk/gtkscalebutton.c
+++ b/gtk/gtkscalebutton.c
@@ -982,7 +982,7 @@ gtk_scale_popup (GtkWidget *widget,
       monitor = gdk_screen_get_monitor_at_point (screen,
 						 button_event->x_root,
 						 button_event->y_root);
-      gdk_screen_get_monitor_geometry (screen, monitor, &rect);
+      _gdk_screen_get_monitor_workarea (screen, monitor, &rect);
 
       if (priv->orientation == GTK_ORIENTATION_VERTICAL)
         y += button_event->y;
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index 00cf525..0d98f28 100644
--- a/gtk/gtkstatusicon.c
+++ b/gtk/gtkstatusicon.c
@@ -2396,7 +2396,7 @@ gtk_status_icon_position_menu (GtkMenu  *menu,
     monitor_num = 0;
   gtk_menu_set_monitor (menu, monitor_num);
 
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   gdk_window_get_origin (window, x, y);
 
diff --git a/gtk/gtktextview.c b/gtk/gtktextview.c
index 4345521..720a7ee 100644
--- a/gtk/gtktextview.c
+++ b/gtk/gtktextview.c
@@ -8137,7 +8137,7 @@ popup_position_func (GtkMenu   *menu,
 
   monitor_num = gdk_screen_get_monitor_at_point (screen, *x, *y);
   gtk_menu_set_monitor (menu, monitor_num);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   *x = CLAMP (*x, monitor.x, monitor.x + MAX (0, monitor.width - req.width));
   *y = CLAMP (*y, monitor.y, monitor.y + MAX (0, monitor.height - req.height));
diff --git a/gtk/gtktoolbar.c b/gtk/gtktoolbar.c
index 5fea923..02de184 100644
--- a/gtk/gtktoolbar.c
+++ b/gtk/gtktoolbar.c
@@ -2644,7 +2644,7 @@ menu_position_func (GtkMenu  *menu,
                                                   gtk_widget_get_window (priv->arrow_button));
   if (monitor_num < 0)
     monitor_num = 0;
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   gtk_widget_get_allocation (priv->arrow_button, &allocation);
 
diff --git a/gtk/gtktooltip.c b/gtk/gtktooltip.c
index 6e7fad8..6e43c03 100644
--- a/gtk/gtktooltip.c
+++ b/gtk/gtktooltip.c
@@ -34,6 +34,7 @@
 #include "gtkhbox.h"
 #include "gtkalignment.h"
 #include "gtksizerequest.h"
+#include "gtkprivate.h"
 
 
 /**
@@ -1024,7 +1025,7 @@ gtk_tooltip_position (GtkTooltip *tooltip,
   monitor_num = gdk_screen_get_monitor_at_point (screen,
                                                  tooltip->last_x,
                                                  tooltip->last_y);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   get_bounding_box (new_tooltip_widget, &bounds);
 
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index 8fffa8e..2010112 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -14994,7 +14994,7 @@ gtk_tree_view_search_position_func (GtkTreeView *tree_view,
   GdkRectangle monitor;
 
   monitor_num = gdk_screen_get_monitor_at_window (screen, tree_window);
-  gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (screen, monitor_num, &monitor);
 
   gtk_widget_realize (search_dialog);
 
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 23a7de5..5656b5d 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -6344,8 +6344,8 @@ center_window_on_monitor (GtkWindow *window,
   if (monitor_num == -1)
     monitor_num = get_center_monitor_of_window (window);
 
-  gdk_screen_get_monitor_geometry (gtk_window_check_screen (window),
-				   monitor_num, &monitor);
+  _gdk_screen_get_monitor_workarea (gtk_window_check_screen (window),
+                                    monitor_num, &monitor);
   
   *x = (monitor.width - w) / 2 + monitor.x;
   *y = (monitor.height - h) / 2 + monitor.y;
