unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#50352: [feature/pgtk] Some menu items are blank when using global menu
@ 2021-09-03  8:15 Chen Zhenge via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-22 20:07 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Chen Zhenge via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2021-09-03  8:15 UTC (permalink / raw)
  To: 50352

[-- Attachment #1: Type: text/plain, Size: 3881 bytes --]

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))

[-- Attachment #2: blank-menu-item.png --]
[-- Type: image/png, Size: 147996 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#50352: [feature/pgtk] Some menu items are blank when using global menu
  2021-09-03  8:15 bug#50352: [feature/pgtk] Some menu items are blank when using global menu Chen Zhenge via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-22 20:07 ` Lars Ingebrigtsen
  2022-08-23  0:40   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-22 20:07 UTC (permalink / raw)
  To: Chen Zhenge; +Cc: 50352

Chen Zhenge <me@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?






^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#50352: [feature/pgtk] Some menu items are blank when using global menu
  2022-08-22 20:07 ` Lars Ingebrigtsen
@ 2022-08-23  0:40   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-08-23 10:44     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-08-23  0:40 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: 50352, Chen Zhenge

Lars Ingebrigtsen <larsi@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#50352: [feature/pgtk] Some menu items are blank when using global menu
  2022-08-23  0:40   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-08-23 10:44     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-23 10:44 UTC (permalink / raw)
  To: Po Lu; +Cc: 50352, Chen Zhenge

Po Lu <luangruo@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.





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-08-23 10:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-03  8:15 bug#50352: [feature/pgtk] Some menu items are blank when using global menu Chen Zhenge via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-22 20:07 ` Lars Ingebrigtsen
2022-08-23  0:40   ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-08-23 10:44     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).