GNOME Bugzilla – Bug 684985
Shows a screenshot of the primary monitor at first view
Last modified: 2018-02-01 13:46:36 UTC
Created attachment 225275 [details] Screenshot of the bug See attached screenshot. It should be the panel and the currently selected wallpaper.
Created attachment 225278 [details] [review] background: Capture the primary monitor Not monitor 0.
Created attachment 225279 [details] [review] background: Add debug to get_screenshot_async()
Attachment 225278 [details] pushed as 112edc7 - background: Capture the primary monitor Attachment 225279 [details] pushed as f4a8e0a - background: Add debug to get_screenshot_async()
Does it work? And what's the output of gnome-control-center run with -v if not.
Created attachment 225300 [details] [review] background: Fix preview when primary is not the leftmost
Comment on attachment 225300 [details] [review] background: Fix preview when primary is not the leftmost Attachment 225300 [details] pushed as 97af01b - background: Fix preview when primary is not the leftmost
This seems to work fine for me in some testing. On irc I suggested doing something more complicated but at the end the day this is pretty much the same thing.
Created attachment 225341 [details] Layout of monitors My primary monitor is the leftmost. However my secondary is rotated counterclockwise, giving me a reverse L-shaped layout. See attachment.
Created attachment 225342 [details] Screenshot with patches With the patches I see the wallpaper, but the panel is missing.
Can I have the -v output as requested?
(In reply to comment #10) > Can I have the -v output as requested? Sorry, I completely forgot about that. Here it is: ... background-cc-panel-DEBUG: Trying to capture rectangle 1366x768 (at 0,1152)
Can you print out the contents of "workarea_rect" in on_screenshot_finished() after the call to gdk_screen_get_monitor_workarea()? I think it's possible that's not taking into account the vertical offset of the monitor. If that doesn't fix it, I'll go through the debug on monday once I know where my monitors are...
Can I also guess that you didn't have the patch from comment 6 committed when you tested this? I just replicated the exact same setup, and couldn't reproduce the problem with current master (but could with the 3.6.0 release).
Rishi, can you please test this again? The bug is on the 3.6.1 blocker list, and I'd like to mark it as fixed ASAP.
(In reply to comment #13) I did have the patch from comment 6. This is what rect and workarea_rect look like respectively: background-cc-panel-Message: (x= 0, y= 1152) (width= 1366, height= 768) background-cc-panel-Message: (x= 0, y= 1152) (width= 1366, height= 768) However, if I push my primary up to have a layout like this: +---------+----------+ | | | | | | | | | +---------+ | | | | | +----------+ then I get: background-cc-panel-Message: (x= 0, y= 0) (width= 1366, height= 768) background-cc-panel-Message: (x= 0, y= 27) (width= 1366, height= 741) ... and I see the panel and the wallpaper, as it should be.
Created attachment 225573 [details] workarea.c Can you please attach the output of this program with the original layout?
I get: ** Message: Workarea for monitor 0 rectangle 1366x768 (at 0,1152) ** Message: Workarea for monitor 1 rectangle 1080x1920 (at 1366,0) The work area for monitor 0 is clearly wrong.
Reassigning to mutter.
Seems to work fine here, with a layout equivalent to the one in theh attached screenshot. Ignoring Wayland which is another matter, as it doesn't provide "work area" information at all right now.
For what it's worth, I tried it again on Fedora 27 with both the Wayland and X sessions. The result is the same on both. With a layout like attachment 225341 [details], I see attachment 225342 [details] in both sessions. ie., I see the wallpaper but not GNOME Shell's top panel. I definitely don't see application windows anymore, which was the original purpose of the bug. So, yeah, FIXED. :)
I'm not sure it was ever "fixed", we just removed the workarea code that, when written, was expected to work for all the backends. It was removed in this bug: https://bugzilla.gnome.org/show_bug.cgi?id=788206
FWIW, I marked it as fixed because attached test case which hasn't got anything to do with g-c-c worked as expected with the layout used in the screenshot.