From: Tony H. <h...@re...> - 2006-07-28 19:20:44
|
I don't know much about X window management, but I thought I'd try some experiments with gnome-terminal's profile editor to see if I could shed some light on the bug, and I hope my findings might help. One thing I noticed is that the dialog flickers on (with border and title bar) then off again before being shown without border and title bar. By adding some sleep()'s and g_print()'s I found out that calling gtk_window_show_all on one of the window's internal widgets - but one that's on an unselected notebook page - causes the top-level window to be partially drawn prematurely. Odd, but it happens in metacity too, so I don't think it's an OroboROX bug. The crucial point is that before opening the dialog (with, FWIW, gtk_window_present) gtk_window_hide gets called on it first, in case it was already open and its transient parent has changed. This seems to be OK if the window already exists but was hidden (if you close a "broken" profile editor dialog then reopen it, it reappears correctly with its borders etc), but evidently hiding a window before it's been shown does something that upsets OroboROX. Next I tried adding a gtk_window_show before gtk_widget_hide and it didn't help at first, so I thought perhaps there needs to be delay between the show and hide for OroboROX to catch up and I inserted a sleep as well. That gave me food for thought, so I tried getting rid of the new gtk_window_show() and leaving the sleep() in. That makes the dialog appear correctly. In fact, the sleep() can go before or after gtk_window_hide(), as long as it's after the gtk_widget_show_all(). -- TH * http://www.realh.co.uk |