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 760651 - Desktop icon under top panel
Desktop icon under top panel
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 750064 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-01-15 04:15 UTC by ruhollah.fazli
Modified: 2017-10-03 22:08 UTC
See Also:
GNOME target: ---
GNOME version: 3.15/3.16


Attachments
Desktop icon under top panel (940.43 KB, image/png)
2016-01-15 04:15 UTC, ruhollah.fazli
  Details
src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new (1.33 KB, patch)
2017-09-06 13:20 UTC, Andrea Azzarone
accepted-commit_now Details | Review
src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new (1.36 KB, patch)
2017-09-06 13:50 UTC, Andrea Azzarone
committed Details | Review
Revert "src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new" (1.57 KB, patch)
2017-09-29 22:22 UTC, Florian Müllner
committed Details | Review
screen: Make sure to initialize NUMBER_OF_DESKTOPS (1.09 KB, patch)
2017-09-29 22:50 UTC, Florian Müllner
committed Details | Review

Description ruhollah.fazli 2016-01-15 04:15:25 UTC
Created attachment 319072 [details]
Desktop icon under top panel

I enabled show desktop icon through gnome tweak tool. After I login to my desktop, some icons are under top panel (in attachment the docx file is under top panel) and after I click an icon, the icons are exited from top panel.
Comment 1 Florian Latifi 2016-02-29 22:35:56 UTC
This is the same problem I described in bug 750064.
Comment 2 Carlos Soriano 2016-03-01 07:47:23 UTC
*** Bug 750064 has been marked as a duplicate of this bug. ***
Comment 3 Tristan Partin 2017-05-13 22:50:10 UTC
Would like to add that as of GNOME 3.24.X, this bug still persists. The behavior I am noticing is that as soon as an application is opened, not specifically nautilus, the icons rearrange themselves to not be under the panel.
Comment 4 Daniel van Vugt 2017-06-08 03:38:04 UTC
See also: https://bugs.launchpad.net/bugs/1696621
Comment 5 Sebastien Bacher 2017-08-17 22:06:00 UTC
That's still an issue in 3.24 and a noticeable issue for Ubuntu since desktop icons are displayed by default there
Comment 6 Andrea Azzarone 2017-09-06 13:20:18 UTC
Created attachment 359266 [details] [review]
src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in  meta_screen_new

Make sure to call set_number_of_spaces_hint in meta_screen_new.
_NET_NUMBER_OF_DESKTOPS is required by nautilus-desktop to correctly
get the desktop workarea.
Comment 7 Andrea Azzarone 2017-09-06 13:50:01 UTC
Created attachment 359269 [details] [review]
src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in  meta_screen_new

I updated the patch to use g_list_length (screen->workspaces) instead of the magic number 1.
Comment 8 Marco Trevisan (Treviño) 2017-09-06 13:50:49 UTC
Review of attachment 359266 [details] [review]:

Looks good to me, meta_workspace_new would change screen->workspaces so using `g_list_length (screen->workspaces)` instead of `1` would work too, but I think it's pointless here, a part being a little more clear.
Comment 9 Marco Trevisan (Treviño) 2017-09-06 13:57:22 UTC
Review of attachment 359269 [details] [review]:

Even better, looks good.
Having a `meta_screen_set_number_of_spaces_hint` which already calls g_list_length could be an improvement too since that's redone multiple times somewhere else, but since all this MetaScreen should go away at some point, we don't probably need this.
Comment 10 Marco Trevisan (Treviño) 2017-09-22 12:57:02 UTC
The following fixes have been pushed:
Comment 11 Marco Trevisan (Treviño) 2017-09-22 15:02:28 UTC
git bz didn't get it right.

Fixed at https://git.gnome.org/browse/mutter/commit/?id=8532b102909e09e1e0fdbd7f2701a7c40de1af5f
Comment 12 Florian Müllner 2017-09-29 22:22:05 UTC
Created attachment 360686 [details] [review]
Revert "src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new"

When dynamic workspaces are used, we pick up an existing NUMBER_OF_DESKTOP
hint in meta_screen_init_workspaces() to properly restore workspaces
on restart. Unconditionally setting that hint to 1 *before* reading it
breaks that, and we end up shifting all windows to the first workspace.

This reverts commit 8532b102909e09e1e0fdbd7f2701a7c40de1af5f.
Comment 13 Florian Müllner 2017-09-29 22:23:03 UTC
Comment on attachment 360686 [details] [review]
Revert "src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new"

Attachment 360686 [details] pushed as fd763ad - Revert "src/core/screen.c: Set _NET_NUMBER_OF_DESKTOPS in meta_screen_new"
Comment 14 Florian Müllner 2017-09-29 22:50:27 UTC
Created attachment 360688 [details] [review]
screen: Make sure to initialize NUMBER_OF_DESKTOPS

update_num_workspaces() is a no-op when the number of workspaces
did not actually change. That is fine, except that we still want
to initialize the _NET_NUMBER_OF_DESKTOPS hint on startup to not
break components like nautilus-desktop that rely on it.
Comment 15 Andrea Azzarone 2017-10-02 18:07:07 UTC
Review of attachment 360688 [details] [review]:

Fix works fine here.
Comment 16 Carlos Garnacho 2017-10-03 21:08:13 UTC
Comment on attachment 360688 [details] [review]
screen: Make sure to initialize NUMBER_OF_DESKTOPS

Ugh, I can see the hint not being set otherwise on startup... Not neat to add a "but" to a no-op branch, but can't think of better ways either, the rest of the function clearly doesn't apply here.
Comment 17 Florian Müllner 2017-10-03 21:16:02 UTC
(In reply to Carlos Garnacho from comment #16)
> Comment on attachment 360688 [details] [review] [review]
> screen: Make sure to initialize NUMBER_OF_DESKTOPS
> 
> Ugh, I can see the hint not being set otherwise on startup... Not neat to
> add a "but" to a no-op branch, but can't think of better ways either,

An alternative would be to call set_number_of_spaces_hint() after the call to update_num_workspaces() in init_workspaces(), but there would be cases where we set the hint twice on startup (to the same value) ...
Comment 18 Florian Müllner 2017-10-03 22:08:17 UTC
Attachment 360688 [details] pushed as 98d77d3 - screen: Make sure to initialize NUMBER_OF_DESKTOPS