GNOME Bugzilla – Bug 151984
Implement Soeren's idea for a backup timestamp when startup notification is not used
Last modified: 2020-11-07 12:36:53 UTC
Soeren had a good idea to allow Metacity to get a backup timestamp when startup notification is not used (this would, for example, allow focus-stealing-prevention to work when launching emacs from a terminal). His idea (from bug 118372) was: 'A nice touch for this problem might be to look at the starttime field in /proc/<pid>. The idea is when a new window arrives to look at the start time for the pid owning the window. If that is before the USER_TIME of any other window, we know that the user has interacted with another window after spawning the new window. In that case the new window shouldn't get focus. This should take of the "start emacs from a terminal and keep typing" problem. The starttime as reported in /proc is in jiffies, so there would have to be a way to convert that to X timestamps (at least an approximation).' I'm filing this here so we don't forget it; personally, I launch almost everything from a terminal, so this would help.
Although this doesn't technically block focus-stealing-prevention, I'm marking it as blocking bug 149028 just to make it easier to find and remember.
bugzilla.gnome.org is being replaced by gitlab.gnome.org. We are closing all old feature requests in Bugzilla which have not seen updates for many years. If you still use metacity and if you are still requesting this feature in a currently supported version of GNOME (currently that would be 3.38), then please feel free to report it at https://gitlab.gnome.org/GNOME/metacity/-/issues/ Thank you for reporting this issue and we are sorry it could not be implemented.