alexmurray / emacs-snap

GNU Emacs in a snap
https://snapcraft.io/emacs
71 stars 13 forks source link

Window grouping is wrong in gnome #24

Closed egh closed 1 year ago

egh commented 3 years ago

OS: Ubuntu 20.04 with ubuntu-gnome-desktop emacs: snap edge

Steps to reproduce:

  1. Close all browser windows
  2. emacs -Q
  3. In *scratch* buffer, type http://example.org
  4. Run M-x browse-url-at-point

Expected result: new browser window has correct "grouping" (not sure what to call this, class?) Actual result: new browser window (firefox) is grouped with emacs

This problem is not unique to the emacs snap: I have the same problem with the slack snap.

Bad result:

image

What it should look like (when starting firefox not from emacs)

image

alexmurray commented 3 years ago

Thanks for the detailed bug report.

I can reproduce it as well - I found the following discussion thread about this issue - https://forum.snapcraft.io/t/slack-opening-file-browser-firefox-and-chrome-in-the-snaps-context/8969 - which references this bug report https://bugs.launchpad.net/snapd/+bug/1835024 - it would seem if you use the firefox snap as a browser it works as expected but if using the deb then this issue occurs. Perhaps there is some more useful guidance in this bug report - let me know if you find a solution and we can mention it here.

egh commented 3 years ago

The problem doesn't seem unique to firefox - I get the same problem with chrome, eog and gnome-calculator. It works as expected with spotify, which I have installed as a snap.

A more succinct error report:

  1. emacs -Q
  2. Ensure firefox (or whatever program is mentioned in (3)) is not running
  3. M-! firefox (or google-chrome or eog or similar gui program
alexmurray commented 3 years ago

FYI - the emacs snap has code to unset some environment variables as part of it's site file (these environment variables are set when the emacs snap is launched to ensure it gio etc looks for libraries inside the snap, not on the host filesystem) - and so the site file unsets these after load to ensure if you spawn another process from within Emacs, it doesn't try and use these libraries itself. But if you run emacs with -Q this will not get used - so instead you should run it with -q so it can still use the site start file etc.

alexmurray commented 1 year ago

I am not able to reproduce this issue. Can you please let me know if this is still an issue on your side?

egh commented 1 year ago

This problem is fixed for me now. I believe this was fixed upstream. Thanks for following up.