Subject: bug#55497: 29.0.50; Emacs Windows unidentified in Wayland (correct bug-report)

From: Julien Cubizolles <[email-masked]>
Date: Thu, 19 May 2022 09:16:47 +0200

Po Lu <[email-masked]> writes:

> Julien Cubizolles <[email-masked]> writes:
>
>> I just realized that something wasn't clear in my bug-report. The frame
>> does have a name, that can be changed with emacs -Q -T "Hello" for
>> instance. This name is displayed by the windows manager when
>> browsing through all open windows with Alt-Tab.
>>
>> However its icon is the generic one used for unidentified applications,
>> even though there is a desktop file for Emacs windows which is used when
>> running older versions of Emacs.
>
> Hmm.  Could you put a breakpoint on `xg_set_icon_from_xpm_data' (the
> version in pgtkfns.c) and see if it's ever hit?

I have no experience in C programming. Don't know if I did the right
thing: I added a print and return in this function:

--8<---------------cut here---------------start------------->8---
xg_set_icon_from_xpm_data (struct frame *f, const char **data)
{
  GdkPixbuf *pixbuf = gdk_pixbuf_new_from_xpm_data (data);

  printf("Got into xg_set_icon_from_xpm_data.\n");
  return 1;
  if (!pixbuf)
    return false;
  
  if (!FRAME_GTK_OUTER_WIDGET (f))
    return false;
  
  gtk_window_set_icon (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)), pixbuf);
  g_object_unref (pixbuf);
  return true;
}
--8<---------------cut here---------------end--------------->8---

and built emacs from git after ./configure --with-pgtk
. Emacs -Q didn't print the message nor dit it
break. It doesn't seem to get to this function.

-- 
Julien Cubizolles