Subject: 30.0.50; individual frame loses keyboard focus, focus cannot be restored

From: [email-masked]
Date: Tue, 27 Dec 2022 13:19:44 +0100

The exact action leading to this bug is not clear to me. It seems to be
related to lsp-mode though -- I've not observed it happening without
lsp-mode.

The symptom is that a single frame will no longer accept keyboard input,
and will visually indicate that it is not focused (outline rectangular
cursor where I'd usually expect a solid rectangular cursor). Mouse input
still works, and other frames still accept keyboard input as normal.

I'd be glad if anyone could point out ways to further debug this issue.
I'm also in #emacs:matrix.org (@linus:schreibt.jetzt) in case
fast-turnaround communication would be helpful :)

In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.24.34, cairo version 1.16.0)
Repository revision: ad5a67996ddf23df904c09165475759e2e0a68b1
Repository branch: master
System Description: NixOS 22.11 (Raccoon)

Configured using:
 'configure
 --prefix=/nix/store/nj8sffdvjjxqadnv0j46ssj73q1k7z61-emacs-pgtk-20221221.0
 --disable-build-details --with-modules --with-x=no --with-xpm=no
 --with-jpeg=no --with-png=no --with-gif=no --with-tiff=no
 --with-native-compilation --with-pgtk'

Configured features:
CAIRO DBUS FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JSON LIBSELINUX
LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PGTK
SECCOMP SOUND SQLITE3 THREADS TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM
GTK3 ZLIB

Important settings:
  value of $EMACSLOADPATH: 
  value of $EMACSNATIVELOADPATH: /nix/store/fpz84pkf3j4cl2xr9qp2a5wszcdw97dl-emacs-packages-deps/share/emacs/native-lisp::
  value of $LANG: en_GB.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Nix

Minor modes in effect:
  direnv-mode: t
  counsel-mode: t
  global-git-commit-mode: t
  magit-auto-revert-mode: t
  shell-dirtrack-mode: t
  evil-mode: t
  evil-local-mode: t
  windmove-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  global-whitespace-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  show-paren-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  buffer-read-only: t
  line-number-mode: t
  transient-mark-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t

Load-path shadows:
/home/linus/.nix-profile/share/emacs/site-lisp/site-start hides /nix/store/fpz84pkf3j4cl2xr9qp2a5wszcdw97dl-emacs-packages-deps/share/emacs/site-lisp/site-start
/home/linus/.nix-profile/share/emacs/site-lisp/site-start hides /nix/store/nj8sffdvjjxqadnv0j46ssj73q1k7z61-emacs-pgtk-20221221.0/share/emacs/site-lisp/site-start
/nix/store/fpz84pkf3j4cl2xr9qp2a5wszcdw97dl-emacs-packages-deps/share/emacs/site-lisp/elpa/transient-20221202.1727/transient hides /nix/store/nj8sffdvjjxqadnv0j46ssj73q1k7z61-emacs-pgtk-20221221.0/share/emacs/30.0.50/lisp/transient
/nix/store/fpz84pkf3j4cl2xr9qp2a5wszcdw97dl-emacs-packages-deps/share/emacs/site-lisp/elpa/nadvice-0.3/nadvice hides /nix/store/nj8sffdvjjxqadnv0j46ssj73q1k7z61-emacs-pgtk-20221221.0/share/emacs/30.0.50/lisp/emacs-lisp/nadvice
/nix/store/fpz84pkf3j4cl2xr9qp2a5wszcdw97dl-emacs-packages-deps/share/emacs/site-lisp/elpa/let-alist-1.0.6/let-alist hides /nix/store/nj8sffdvjjxqadnv0j46ssj73q1k7z61-emacs-pgtk-20221221.0/share/emacs/30.0.50/lisp/emacs-lisp/let-alist
/nix/store/fpz84pkf3j4cl2xr9qp2a5wszcdw97dl-emacs-packages-deps/share/emacs/site-lisp/elpa/eldoc-1.13.0/eldoc hides /nix/store/nj8sffdvjjxqadnv0j46ssj73q1k7z61-emacs-pgtk-20221221.0/share/emacs/30.0.50/lisp/emacs-lisp/eldoc

Features:
(shadow sort mail-extr emacsbug misearch multi-isearch mule-util
sh-script treesit executable cua-base sql nix-mode smie nix-repl
nix-shell nix-store nix-log nix-instantiate nix-shebang nix-format nix
lsp-diagnostics company-oddmuse company-keywords company-etags etags
fileloop generator company-gtags company-dabbrev-code company-dabbrev
company-files company-clang company-capf company-cmake company-semantic
company-template company-bbdb company lsp-headerline lsp-icons
lsp-modeline lsp-lens lsp-ui lsp-ui-flycheck lsp-ui-doc lsp-ui-imenu
lsp-ui-peek lsp-ui-sideline flycheck lsp-ui-util face-remap find-func
vc-svn view lsp-zig lsp-steep lsp-svelte lsp-sqls lsp-ruby-syntax-tree
lsp-yaml lsp-xml lsp-vimscript lsp-vhdl lsp-volar lsp-vetur lsp-html
lsp-verilog lsp-vala lsp-v lsp-typeprof lsp-ttcn3 lsp-toml lsp-terraform
lsp-tex lsp-sorbet lsp-solargraph lsp-rust lsp-rf lsp-remark lsp-racket
lsp-r lsp-purescript lsp-pylsp lsp-pyls lsp-pwsh lsp-php lsp-pls
lsp-perlnavigator lsp-perl lsp-openscad lsp-ocaml lsp-magik lsp-nix
lsp-nim lsp-nginx lsp-mint lsp-marksman lsp-markdown lsp-lua lsp-kotlin
lsp-json lsp-javascript lsp-idris lsp-haxe lsp-haskell lsp-groovy
lsp-hack lsp-graphql lsp-gleam lsp-go lsp-completion lsp-gdscript
lsp-fsharp lsp-fortran lsp-eslint lsp-erlang lsp-emmet lsp-elixir
lsp-elm lsp-dockerfile lsp-dhall lsp-d lsp-css lsp-csharp lsp-crystal
lsp-cmake lsp-clojure lsp-semantic-tokens lsp-clangd dom lsp-beancount
lsp-bash lsp-astro lsp-ansible lsp-angular lsp-ada lsp-actionscript
lsp-mode lsp-protocol tree-widget spinner network-stream nsm
markdown-mode noutline outline lv inline ht f f-shortdoc shortdoc s ewoc
vc-git vc-dispatcher rust-utils rust-mode rust-rustfmt rust-playpen
rust-compile rust-cargo dired-aux ffap tramp tramp-loaddefs trampver
tramp-integration cus-edit pp cus-start cus-load files-x tramp-compat
parse-time iso8601 ls-lisp direnv counsel xdg xref project compile
swiper ivy delsel ivy-faces ivy-overlay colir color notmuch notmuch-tree
notmuch-jump notmuch-hello wid-edit notmuch-show notmuch-print
notmuch-crypto notmuch-mua notmuch-message notmuch-draft
notmuch-maildir-fcc notmuch-address notmuch-company notmuch-parser
notmuch-wash coolj goto-addr icalendar diary-lib diary-loaddefs cal-menu
calendar cal-loaddefs notmuch-tag notmuch-lib notmuch-version
notmuch-compat pcase hl-line mm-view mml-smime smime gnutls dig
magit-submodule magit-obsolete magit-blame magit-stash magit-reflog
magit-bisect magit-push magit-pull magit-fetch magit-clone magit-remote
magit-commit magit-sequence magit-notes magit-worktree magit-tag
magit-merge magit-branch magit-reset magit-files magit-refs magit-status
magit magit-repos magit-apply magit-wip magit-log which-func imenu
magit-diff smerge-mode diff-mode easy-mmode git-commit log-edit message
sendmail yank-media puny dired dired-loaddefs rfc822 mml mml-sec epa
derived epg rfc6068 epg-config gnus-util text-property-search time-date
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader
pcvs-util add-log magit-core magit-autorevert autorevert filenotify
magit-margin magit-transient magit-process with-editor server magit-mode
transient magit-git magit-base magit-section format-spec crm dash
compat-27 compat-26 compat compat-macs evil evil-keybindings
evil-integration evil-maps evil-commands reveal flyspell ispell
evil-jumps evil-command-window evil-search evil-ex shell pcomplete
comint ansi-osc ansi-color evil-types evil-macros evil-repeat
evil-states evil-core comp comp-cstr warnings icons rx cl-extra
help-mode advice evil-common windmove calc calc-loaddefs calc-macs
thingatpt rect evil-digraphs evil-vars ring edmacro kmacro undo-tree
diff queue disp-table whitespace yaml-mode-autoloads
vterm-toggle-autoloads vterm-autoloads undo-tree-autoloads
typescript-mode-autoloads transpose-frame-autoloads
terraform-mode-autoloads sudo-edit-autoloads scad-preview-autoloads
scad-mode-autoloads rust-mode-autoloads queue-autoloads
php-mode-autoloads nix-mode-autoloads lsp-ui-autoloads lsp-ivy-autoloads
lsp-haskell-autoloads keyfreq-autoloads jq-mode-autoloads
helm-lsp-autoloads lsp-mode-autoloads lv-autoloads spinner-autoloads
ht-autoloads helm-autoloads popup-autoloads helm-core-autoloads
hcl-mode-autoloads haskell-mode-autoloads forge-autoloads yaml-autoloads
markdown-mode-autoloads magit-autoloads magit-section-autoloads
git-commit-autoloads with-editor-autoloads transient-autoloads
ghub-autoloads treepy-autoloads flycheck-autoloads let-alist-autoloads
pkg-info-autoloads f-autoloads s-autoloads evil-autoloads
goto-chg-autoloads epl-autoloads eldoc-autoloads docbook-autoloads
direnv-autoloads dhall-mode-autoloads reformatter-autoloads
dash-autoloads counsel-autoloads swiper-autoloads ivy-autoloads
company-autoloads closql-autoloads emacsql-sqlite-autoloads
emacsql-autoloads info compat-autoloads nadvice-autoloads
async-autoloads package browse-url url url-proxy url-privacy url-expand
url-methods url-history url-cookie generate-lisp-file url-domsuf
url-util mailcap url-handlers url-parse auth-source cl-seq eieio
eieio-core cl-macs password-cache json subr-x map byte-opt gv bytecomp
byte-compile url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel term/pgtk-win pgtk-win term/common-win pgtk-dnd
tool-bar dnd fontset image regexp-opt fringe tabulated-list replace
newcomment text-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 nadvice seq
simple cl-generic indonesian philippine 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 emoji-zwj charscript charprop case-table
epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button
loaddefs theme-loaddefs faces cus-face macroexp files window
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget keymap hashtable-print-readable backquote threads dbusbind
inotify dynamic-setting system-font-setting font-render-setting cairo
gtk pgtk multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 525894 67567)
 (symbols 48 39360 0)
 (strings 32 136284 9664)
 (string-bytes 1 4697353)
 (vectors 16 88803)
 (vector-slots 8 1674860 55920)
 (floats 8 533 536)
 (intervals 56 4681 681)
 (buffers 984 37))