Bug#248109: gksu's grab failure reporting is broken

Ryan Murray Ryan Murray <rmurray@debian.org>, 248109@bugs.debian.org
Sun, 9 May 2004 04:09:57 -0700


Package: libgksu0
Version: 1.0.6-1
Severity: serious

If gksu fails to grab the keyboard (which almost always happens on my
system) it displays the error dialog before it shows the main window,
and the main window ends up never drawing any of its widgets.  In
addition, the error message ends up being behind the gksu window.  The
following patch fixes the problem:

--- libgksu.c   2004-05-09 03:40:59.000000000 -0700
+++ libgksu.c.new       2004-05-09 03:33:32.000000000 -0700
@@ -336,8 +336,8 @@
          while (gtk_events_pending())
            gtk_main_iteration ();
 
-         report_failed_grab ();
          gtk_widget_show (dialog);
+         report_failed_grab ();
        }
     }
 
This still leaves the problem of why the grabs are failing.  gnome-ssh-askpass
in the ssh package tries each grab 16 times, with a 250 millisecond delay
between each attempt, and it has no problems with grabbing on my system.
Perhaps gksu needs to do something similar?  If I slow gksu down by running
it under strace or ltrace, it has no problems obtaining the grabs.