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 773686 - Software when launched shows in dash with wrong icon, name and menu
Software when launched shows in dash with wrong icon, name and menu
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Backend: Wayland
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 773381 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-10-30 00:54 UTC by Eduardo Silva
Modified: 2017-01-25 17:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Showing Software's icon in dash (and past favorited software icon) (7.03 KB, image/png)
2016-10-30 00:54 UTC, Eduardo Silva
  Details
wayland: Push NULL buffer when hiding a GdkWindow (2.02 KB, patch)
2017-01-19 15:14 UTC, Carlos Garnacho
committed Details | Review
wayland: Ensure to set gtk_surface dbus properties after hide() (1.13 KB, patch)
2017-01-25 14:58 UTC, Carlos Garnacho
committed Details | Review

Description Eduardo Silva 2016-10-30 00:54:25 UTC
Created attachment 338784 [details]
Showing Software's icon in dash (and past favorited software icon)

Software when opened is shown in the dash with the wrong icon, the tooltip 'gnome-software' and one menu option called 'Applications' (translated).

This was not always the case, just noticed it today.

Attached screenshot

Software 3.22
gnome 3.22.1
Fedora 25
Comment 1 Eduardo Silva 2016-10-30 00:55:02 UTC
Running under Wayland.
Comment 2 Eduardo Silva 2016-11-05 15:35:36 UTC
Not sure what happened, but it is fixed :)
Comment 3 Eduardo Silva 2016-11-09 20:53:15 UTC
The fix was temporary, Software is tied to extra "blank" icon again.
Comment 4 Kalev Lember 2016-11-10 10:49:01 UTC
I think the mutter and gtk3 updates in https://bugzilla.redhat.com/show_bug.cgi?id=1376471 should fix this.
Comment 5 Eduardo Silva 2016-11-12 15:24:30 UTC
(In reply to Kalev Lember from comment #4)
> I think the mutter and gtk3 updates in
> https://bugzilla.redhat.com/show_bug.cgi?id=1376471 should fix this.

I have those versions of gtk3 and mutter installed, but the issue remains.

Hope you don't mind me re-opening this.
Comment 6 Florian Müllner 2016-11-25 15:39:42 UTC
Hey, here's one thing that will probably help us to figure out the issue:

 (1) Open "looking glass" (<alt>f2 lg)
 (2) Select "Windows"
 (3) Select the "Software" window (or "gnome-software"?),
     click the "Insert" button
 (4) Switch to "Evaluator"
 (5) Enter "it.gtk_application_id" and post the output
((6) Get out of "looking glass" with Escape)
Comment 7 Eduardo Silva 2016-11-27 16:58:46 UTC
Inside looking glass, I see Software shown like this:

Applications
wmclass: gnome-software
<untracked>

I can't click gnome-software, but can "Applications". When I insert the code in "Evaluator" it outputs:

r(1) = null
Comment 8 Florian Müllner 2016-11-28 10:56:24 UTC
We tracked this down to an issue in Gdk. I think Carlos will have a proper patch in the next couple of days.
Comment 9 Kalev Lember 2016-12-02 06:25:09 UTC
*** Bug 773381 has been marked as a duplicate of this bug. ***
Comment 10 Michael Catanzaro 2017-01-14 16:29:38 UTC
(In reply to Florian Müllner from comment #8)
> We tracked this down to an issue in Gdk. I think Carlos will have a proper
> patch in the next couple of days.

I can reproduce the issue on my fully-updated F25 system.
Comment 11 Carlos Garnacho 2017-01-19 15:14:10 UTC
Created attachment 343802 [details] [review]
wayland: Push NULL buffer when hiding a GdkWindow

This is how windows are meant to be hidden as per the wayland
protocol, there's no need to destroy the xdg_surface and other
interfaces.

Also, rename gdk_wayland_window_hide_surface() to clear_surface(),
as that's what it does.
Comment 12 Matthias Clasen 2017-01-19 15:15:13 UTC
Review of attachment 343802 [details] [review]:

ok
Comment 13 Carlos Garnacho 2017-01-19 15:20:56 UTC
Attachment 343802 [details] pushed as 6beb0b9 - wayland: Push NULL buffer when hiding a GdkWindow
Comment 14 Daniel Stone 2017-01-19 18:27:44 UTC
(In reply to Carlos Garnacho from comment #11)
> This is how windows are meant to be hidden as per the wayland
> protocol, there's no need to destroy the xdg_surface and other
> interfaces.

Erm ...

  if (surface->buffer_ref.buffer == NULL && priv->first_buffer_attached)
    {
      /* XDG surfaces can't commit NULL buffers */
      wl_resource_post_error (surface->resource,
                              WL_DISPLAY_ERROR_INVALID_OBJECT,
                              "Cannot commit a NULL buffer to an xdg_surface");
      return;
    }
Comment 15 Carlos Garnacho 2017-01-19 19:37:41 UTC
wth is wrong with me... thinking further about when I came up with the fix (some months ago), IIRC we just needed to preserve the gtk1_surface, then I came to this misassumption and stashed the patch, which I happily continued with when unstashing today.

I will revert and provide a proper patch.
Comment 16 Carlos Garnacho 2017-01-25 14:58:19 UTC
Created attachment 344237 [details] [review]
wayland: Ensure to set gtk_surface dbus properties after hide()

Currently hiding destroys the wl_surface and all related interfaces,
(including the gtk_surface1) so the next time the GdkWindow is mapped,
we don't bother to set the DBus properties. Toggle the check off so
it's actually issued again after the GdkWindow gets a gtk_surface1.
Comment 17 Matthias Clasen 2017-01-25 16:12:49 UTC
Review of attachment 344237 [details] [review]:

assuming it was tested, ok
Comment 18 Carlos Garnacho 2017-01-25 17:07:41 UTC
This one was, if I can trust my short term memory any better than my long
term one :). This fix is also simpler, might still be nicer to preserve
the wl_surface while the window is hidden, but it's not intrinsically
related to this bug.

Attachment 344237 [details] pushed as baa83e9 - wayland: Ensure to set gtk_surface dbus properties after hide()