After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 676076 - policykit-gnome authentication dialog doesn't always focus with metacity
policykit-gnome authentication dialog doesn't always focus with metacity
Status: RESOLVED WONTFIX
Product: policykit-gnome
Classification: Platform
Component: authentication dialog
unspecified
Other Linux
: Normal normal
: ---
Assigned To: policykit-gnome-maint
policykit-gnome-maint
gnome[unmaintained]
Depends on:
Blocks:
 
 
Reported: 2012-05-15 07:59 UTC by Jeffrey Knockel
Modified: 2019-02-23 02:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to circumvent some window manager's focus-stealing prevention (1.04 KB, patch)
2012-05-15 07:59 UTC, Jeffrey Knockel
none Details | Review

Description Jeffrey Knockel 2012-05-15 07:59:09 UTC
Created attachment 214065 [details] [review]
Patch to circumvent some window manager's focus-stealing prevention

policykit-gnome's authentication dialog doesn't consistently get focused using metacity.  One side effect of when the dialog doesn't get focused is that passwords can get mistakenly typed in plain sight into other windows, e.g., terminals.   Here is the relevant launchpad bug:
https://bugs.launchpad.net/ubuntu/+source/policykit-gnome/+bug/946171

I believe that this is related to metacity's focus-stealing prevention and the use of gtk_window_present() vs. gtk_window_present_with_time().  The function gtk_window_present() seems to use X11 server times from the last X timestamp received from some X event, which can be stale, and in the case of the first call to gtk_window_present(), 0 is used!

metacity's output:

Window manager warning: Buggy client sent a _NET_ACTIVE_WINDOW message with a timestamp of 0 for 0xc00003 (Authentica)
Window manager warning: meta_window_activate called by a pager with a 0 timestamp; the pager needs to be fixed.

I've attached a patch with a proposed fix passing fresh X11 time stamps from  gdk_x11_get_server_time() to gtk_window_present_with_time().
Comment 1 André Klapper 2019-02-23 02:45:04 UTC
policykit-gnome is not under active development anymore.
Its codebase has been archived:
https://gitlab.gnome.org/Archive/policykit-gnome/commits/master

Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect
reality. Please feel free to reopen this ticket (or rather reactivate the project
to GNOME Gitlab, as GNOME Bugzilla is deprecated) if anyone takes the
responsibility for active development again.