GNOME Bugzilla – Bug 376315
gdk_window_update_idle is not getting invoked when logged into gdm failsafe terminal session.
Last modified: 2009-06-01 05:37:31 UTC
Problem: -------- When we login to "Failsafe Terminal session" from gdm (gdm-binary running with the attached patch), the Failsafe dialog does not get exposed properly. Steps to simulate: ------------------ 1) Run gdm-binary which has been patched with the attached gdm-patch.diff 2) Select Failsafe Terminal session and login. Observation ----------- o The Failsafe dialog thrown by gdm-binary is not shown properly. Text and the button within the dialog are not exposed. o In gdm configuration file, load the default a11y modules (GtkModulesList) and restart gdm. Now if we login to failsafe terminal, the dialog is shown properly.
Did a bit of debugging on this and below are some of my findings. In gdk_window_schedule_update, gdk_window_update_idle is set as a callback function to the idle source. Case 1: When default a11y modules are loaded o "gdk_window_update_idle" the idle callback function is called from g_idle_dispatch loop. o This in turn invokes gdk_window_process_updates which finally updates the window internal and explicitly sends expose events to the window. o This expose event triggers off subsequent expose events to various children present in the gtkcontainer and thereby the dialog is seen properly. Case 2: When default a11y modules are not loaded o "gdk_window_update_idle" the idle callback function never gets invoked from the dispatch loop. o There by the window internals does not get updated and also the explicit expose event is not sent by gdk. o Hence the text and the buttons in the dialog are not exposed and shown properly. I replaced "g_idle_add_full" in gdk_window_schedule_update with g_timeout_add as below ------ if (!update_idle) { update_idle = g_timeout_add (GDK_PRIORITY_REDRAW, gdk_window_update_idle, NULL); } ----- With the above change, the callback function "gdk_window_update_idle" got invoked and everything worked fine.
Created attachment 76763 [details] Necessary gdm patch This gdm patch needs to be applied on latest gdm code to simulate this problem.
I can confirm this is a problem in Ubuntu Jaunty with gdm version 2.20.10-0ubuntu2 Is there any further information needed? This bug is also being tracked at Launchpad https://bugs.launchpad.net/ubuntu/+source/gdm/+bug/78470
This is not a GDK bug. You need to figure out what is taking all the CPU time and preventing the GDK update idle being called. (attaching to the program with gdb and hitting control-c to interrupt it may be sufficient.) The difference with the timeout is that timeouts by default have a higher priority. Reassigning to gdm - probably should be closed NOTGNOME since it doesn't occur without patching GDM.
Agreed, clsoing.