After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 788208 - gdk_screen_get_monitor_workarea returns screen geometry, not work area
gdk_screen_get_monitor_workarea returns screen geometry, not work area
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-09-26 19:29 UTC by Robert Ancell
Modified: 2017-10-11 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gdk: Fix gdk_screen_get_monitor_workarea not returning work area (752 bytes, patch)
2017-09-26 19:32 UTC, Robert Ancell
committed Details | Review

Description Robert Ancell 2017-09-26 19:29:03 UTC
From commit 0611cb4823c the following was changed:

@@ -877,11 +850,16 @@ gdk_screen_get_monitor_workarea (GdkScreen    *screen,
                                  gint          monitor_num,
                                  GdkRectangle *dest)
 {
+  GdkMonitor *monitor;
+
   g_return_if_fail (GDK_IS_SCREEN (screen));
-  g_return_if_fail (monitor_num >= 0);
-  g_return_if_fail (monitor_num < gdk_screen_get_n_monitors (screen));
 
-  GDK_SCREEN_GET_CLASS (screen)->get_monitor_workarea (screen, monitor_num, dest);
+  monitor = get_monitor (screen, monitor_num);
+
+  g_return_if_fail (monitor != NULL);
+
+  /* FIXME */
+  gdk_monitor_get_geometry (monitor, dest);
 }

This means that gdk_screen_get_monitor_workarea no longer gets the work area.
Comment 1 Robert Ancell 2017-09-26 19:29:29 UTC
This was introduced in 3.22 (master no longer has these legacy functions).
Comment 2 Robert Ancell 2017-09-26 19:32:58 UTC
Created attachment 360485 [details] [review]
gdk: Fix gdk_screen_get_monitor_workarea not returning work area
Comment 3 Robert Ancell 2017-09-26 19:33:58 UTC
This causes the background panel in Control Center to change behaviour (bug 788206).
Comment 4 Matthias Clasen 2017-10-11 16:47:42 UTC
Review of attachment 360485 [details] [review]:

Looks obviously right.