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 684985 - Shows a screenshot of the primary monitor at first view
Shows a screenshot of the primary monitor at first view
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.6.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
3.6.1
Depends on:
Blocks:
 
 
Reported: 2012-09-27 17:25 UTC by Debarshi Ray
Modified: 2018-02-01 13:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot of the bug (68.78 KB, image/png)
2012-09-27 17:25 UTC, Debarshi Ray
  Details
background: Capture the primary monitor (1.79 KB, patch)
2012-09-27 18:37 UTC, Bastien Nocera
committed Details | Review
background: Add debug to get_screenshot_async() (971 bytes, patch)
2012-09-27 18:38 UTC, Bastien Nocera
committed Details | Review
background: Fix preview when primary is not the leftmost (1.59 KB, patch)
2012-09-27 23:32 UTC, Bastien Nocera
committed Details | Review
Layout of monitors (22.79 KB, image/png)
2012-09-28 15:39 UTC, Debarshi Ray
  Details
Screenshot with patches (97.14 KB, image/png)
2012-09-28 15:40 UTC, Debarshi Ray
  Details
workarea.c (545 bytes, text/plain)
2012-10-02 11:29 UTC, Bastien Nocera
  Details

Description Debarshi Ray 2012-09-27 17:25:43 UTC
Created attachment 225275 [details]
Screenshot of the bug

See attached screenshot.

It should be the panel and the currently selected wallpaper.
Comment 1 Bastien Nocera 2012-09-27 18:37:47 UTC
Created attachment 225278 [details] [review]
background: Capture the primary monitor

Not monitor 0.
Comment 2 Bastien Nocera 2012-09-27 18:38:04 UTC
Created attachment 225279 [details] [review]
background: Add debug to get_screenshot_async()
Comment 3 Bastien Nocera 2012-09-27 19:12:39 UTC
Attachment 225278 [details] pushed as 112edc7 - background: Capture the primary monitor
Attachment 225279 [details] pushed as f4a8e0a - background: Add debug to get_screenshot_async()
Comment 4 Bastien Nocera 2012-09-27 19:21:32 UTC
Does it work? And what's the output of gnome-control-center run with -v if not.
Comment 5 Bastien Nocera 2012-09-27 23:32:12 UTC
Created attachment 225300 [details] [review]
background: Fix preview when primary is not the leftmost
Comment 6 Bastien Nocera 2012-09-27 23:52:37 UTC
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
Comment 7 William Jon McCann 2012-09-28 00:43:26 UTC
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.
Comment 8 Debarshi Ray 2012-09-28 15:39:42 UTC
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.
Comment 9 Debarshi Ray 2012-09-28 15:40:27 UTC
Created attachment 225342 [details]
Screenshot with patches

With the patches I see the wallpaper, but the panel is missing.
Comment 10 Bastien Nocera 2012-09-28 17:18:37 UTC
Can I have the -v output as requested?
Comment 11 Debarshi Ray 2012-09-28 17:25:32 UTC
(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)
Comment 12 Bastien Nocera 2012-09-29 14:02:28 UTC
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...
Comment 13 Bastien Nocera 2012-09-30 03:42:36 UTC
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).
Comment 14 Bastien Nocera 2012-10-01 21:17:06 UTC
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.
Comment 15 Debarshi Ray 2012-10-02 11:19:14 UTC
(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.
Comment 16 Bastien Nocera 2012-10-02 11:29:40 UTC
Created attachment 225573 [details]
workarea.c

Can you please attach the output of this program with the original layout?
Comment 17 Debarshi Ray 2012-10-02 11:34:08 UTC
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.
Comment 18 Debarshi Ray 2012-10-02 11:49:38 UTC
Reassigning to mutter.
Comment 19 Jonas Ådahl 2018-02-01 10:22:35 UTC
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.
Comment 20 Debarshi Ray 2018-02-01 11:34:49 UTC
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. :)
Comment 21 Bastien Nocera 2018-02-01 12:12:18 UTC
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
Comment 22 Jonas Ådahl 2018-02-01 13:35:58 UTC
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.