GNU bug report logs - #50352
[feature/pgtk] Some menu items are blank when using global menu

Previous Next

Package: emacs;

Reported by: Chen Zhenge <me <at> markle.one>

Date: Fri, 3 Sep 2021 08:29:02 UTC

Severity: normal

Tags: moreinfo, wontfix

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50352 in the body.
You can then email your comments to 50352 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#50352; Package emacs. (Fri, 03 Sep 2021 08:29:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Chen Zhenge <me <at> markle.one>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 03 Sep 2021 08:29:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Chen Zhenge <me <at> markle.one>
To: bug-gnu-emacs <at> gnu.org
Subject: [feature/pgtk] Some menu items are blank when using global menu
Date: Fri, 3 Sep 2021 16:15:31 +0800
[Message part 1 (text/plain, inline)]
Hi all,


I tried out the pgtk branch recently. It has some issues with my global 
menu widget. Specifically, When a new menu is created, some of its items 
are blank in the global menu.


Below are steps to reproduce the problem:

- Add a global menu widget. In my case I'm using xfce4-appmenu-plugin. 
Note that KDE's global menu widget seems to have its own bugs.

- gsettings set org.appmenu.gtk-module whitelist '["emacs"]'

- emacs -Q

- Open an elisp file

- Open the Emacs-Lisp menu, the first three items are blank


I did some debugging and found that this bug seems to be related to how 
emacs handles menu changes. In gtkutil.c:xg_update_menubar, emacs will 
simply rename the top-level menu when one menu is replaced by another 
(in ! val_in_menubar && ! iter_in_new_menubar branch). If I change the 
code to first remove the old menu, then add the new one, the items are 
displayed correctly.



In GNU Emacs 28.0.50 (build 2, x86_64-pc-linux-gnu, GTK+ Version 
3.24.24, cairo version 1.16.0)
 of 2021-09-03 built on debian
Repository revision: 4c49ec7f865bdad1629d2f125f71f4e506b258f2
Repository branch: feature/pgtk
Windowing system distributor 'System Description: Debian GNU/Linux 11 
(bullseye)

Configured using:
 'configure --with-pgtk'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND THREADS TIFF TOOLKIT_SCROLL_BARS XIM
GTK3 ZLIB

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  global-eldoc-mode: t
  eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  indent-tabs-mode: t
  transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail
rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs
eieio-loaddefs password-cache json map text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
iso-transl tooltip eldoc electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel term/pgtk-win pgtk-win term/common-win tool-bar
dnd fontset image regexp-opt fringe tabulated-list replace newcomment
text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar
rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock
font-lock syntax font-core term/tty-colors frame minibuffer cl-generic
cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese composite charscript charprop
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
cl-preloaded nadvice button loaddefs faces cus-face macroexp files
window text-properties overlay sha1 md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit pgtk lcms2 multi-tty make-network-process
emacs)

Memory information:
((conses 16 50339 6400)
 (symbols 48 6611 1)
 (strings 32 18173 2535)
 (string-bytes 1 600200)
 (vectors 16 13336)
 (vector-slots 8 178859 10679)
 (floats 8 21 35)
 (intervals 56 195 0)
 (buffers 992 10))
[blank-menu-item.png (image/png, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50352; Package emacs. (Mon, 22 Aug 2022 20:08:01 GMT) Full text and rfc822 format available.

Message #8 received at 50352 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Chen Zhenge <me <at> markle.one>
Cc: 50352 <at> debbugs.gnu.org
Subject: Re: bug#50352: [feature/pgtk] Some menu items are blank when using
 global menu
Date: Mon, 22 Aug 2022 22:07:32 +0200
Chen Zhenge <me <at> markle.one> writes:

> I tried out the pgtk branch recently. It has some issues with my
> global menu widget. Specifically, When a new menu is created, some of
> its items are blank in the global menu.

(I'm going through old bug reports that unfortunately weren't resolved
at the time.)

I'm not sure what a "global menu widget" is -- is it something that
exists in KDE?

> Below are steps to reproduce the problem:
>
> - Add a global menu widget. In my case I'm using
>   xfce4-appmenu-plugin. Note that KDE's global menu widget seems to
>  have its own bugs.
>
> - gsettings set org.appmenu.gtk-module whitelist '["emacs"]'
>
> - emacs -Q
>
> - Open an elisp file
>
> - Open the Emacs-Lisp menu, the first three items are blank

Do you still see this behaviour in Emacs 29?





Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 22 Aug 2022 20:08:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50352; Package emacs. (Tue, 23 Aug 2022 00:42:01 GMT) Full text and rfc822 format available.

Message #13 received at 50352 <at> debbugs.gnu.org (full text, mbox):

From: Po Lu <luangruo <at> yahoo.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 50352 <at> debbugs.gnu.org, Chen Zhenge <me <at> markle.one>
Subject: Re: bug#50352: [feature/pgtk] Some menu items are blank when using
 global menu
Date: Tue, 23 Aug 2022 08:40:54 +0800
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> I'm not sure what a "global menu widget" is -- is it something that
> exists in KDE?

It's one of many third party programs that link themselves into GTK and
moves the menu bar from programs to the KDE panel.  They are never
implemented properly, and thus do not work with the Emacs lazy menu
update mechanism.

So I'd say this bug is a wontfix.  Please tell the global menu widget
developers to send proper GDK_BUTTON_PRESS and GDK_BUTTON_RELEASE events
to the program's menu bar before displaying its contents.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#50352; Package emacs. (Tue, 23 Aug 2022 10:46:02 GMT) Full text and rfc822 format available.

Message #16 received at 50352 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Po Lu <luangruo <at> yahoo.com>
Cc: 50352 <at> debbugs.gnu.org, Chen Zhenge <me <at> markle.one>
Subject: Re: bug#50352: [feature/pgtk] Some menu items are blank when using
 global menu
Date: Tue, 23 Aug 2022 12:44:54 +0200
Po Lu <luangruo <at> yahoo.com> writes:

> It's one of many third party programs that link themselves into GTK and
> moves the menu bar from programs to the KDE panel.  They are never
> implemented properly, and thus do not work with the Emacs lazy menu
> update mechanism.

Ah, I see.

> So I'd say this bug is a wontfix.  Please tell the global menu widget
> developers to send proper GDK_BUTTON_PRESS and GDK_BUTTON_RELEASE events
> to the program's menu bar before displaying its contents.

OK, closing this bug report.




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 23 Aug 2022 10:46:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 50352 <at> debbugs.gnu.org and Chen Zhenge <me <at> markle.one> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Tue, 23 Aug 2022 10:46:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 20 Sep 2022 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.