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 788206 - Background screenshot code doesn't work in GTK+ 3.22
Background screenshot code doesn't work in GTK+ 3.22
Status: RESOLVED FIXED
Product: gnome-control-center
Classification: Core
Component: Background
git master
Other Linux
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
: 782415 789624 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-09-26 19:09 UTC by Robert Ancell
Modified: 2017-11-01 16:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
background: Drop dead background screenshot code (10.16 KB, patch)
2017-09-26 19:09 UTC, Robert Ancell
committed Details | Review

Description Robert Ancell 2017-09-26 19:09:21 UTC
Created attachment 360480 [details] [review]
background: Drop dead background screenshot code

cc-background-panel.c contains:

gdk_screen_get_monitor_geometry (gtk_widget_get_screen (widget), primary, &data->monitor_rect);
gdk_screen_get_monitor_workarea (gtk_widget_get_screen (widget), primary, &data->workarea_rect);

Which both get the same result due to the following changed in GTK 3.22 

void
gdk_screen_get_monitor_workarea (GdkScreen    *screen,
                                 gint          monitor_num,
                                 GdkRectangle *dest)
{
  ...

  /* FIXME */
  gdk_monitor_get_geometry (monitor, dest);
}

Due to these values being the same a screenshot of zero size is requested. This causes a slight delay showing the background, but doesn't change the content. This may be a bug in GTK+, or this screenshot code is not required anymore.

I've attached a patch that removes it if we don't need it anymore.

(Bug was found migrating to non-deprecated API which then did get the correct workarea and the background looked broken).
Comment 1 Robert Ancell 2017-09-26 19:33:22 UTC
See bug 788208 for GTK+ regression.
Comment 2 Rui Matos 2017-11-01 15:04:41 UTC
Review of attachment 360480 [details] [review]:

this looks good. the screenshot was only trying to capture gnome-shell's top bar to overlay on the background preview but now on 3.26 the top bar might be transparent which obviously wouldn't work at all for previewing a different wallpaper so that's another reason to drop this
Comment 3 Rui Matos 2017-11-01 15:05:04 UTC
*** Bug 789624 has been marked as a duplicate of this bug. ***
Comment 4 Rui Matos 2017-11-01 15:40:46 UTC
*** Bug 782415 has been marked as a duplicate of this bug. ***
Comment 5 Rui Matos 2017-11-01 16:40:51 UTC
Attachment 360480 [details] pushed as 6723ff4 - background: Drop dead background screenshot code