GNOME Bugzilla – Bug 760651
Desktop icon under top panel
Last modified: 2017-10-03 22:08:23 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.
This is the same problem I described in bug 750064.
*** Bug 750064 has been marked as a duplicate of this bug. ***
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.
See also: https://bugs.launchpad.net/bugs/1696621
That's still an issue in 3.24 and a noticeable issue for Ubuntu since desktop icons are displayed by default there
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.
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.
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.
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.
The following fixes have been pushed:
git bz didn't get it right. Fixed at https://git.gnome.org/browse/mutter/commit/?id=8532b102909e09e1e0fdbd7f2701a7c40de1af5f
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 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"
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.
Review of attachment 360688 [details] [review]: Fix works fine here.
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.
(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) ...
Attachment 360688 [details] pushed as 98d77d3 - screen: Make sure to initialize NUMBER_OF_DESKTOPS