[rhel7/master] Don't call BusyCursor before Gdk is setup (#1078868)

Vratislav Podzimek vpodzime at redhat.com
Thu Sep 18 07:27:19 UTC 2014


On Wed, 2014-09-17 at 16:06 -0700, Brian C. Lane wrote:
> The setup method is too early, the Gdk.get_default_root_window call
> fails. So Remove the call to busyCursor, but just in case also silently
> return if busyCursor or unbusyCursor doesn't get a window.
> ---
>  pyanaconda/ui/gui/__init__.py | 2 --
>  pyanaconda/ui/gui/utils.py    | 6 ++++++
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
> index b64d983..efd3400 100644
> --- a/pyanaconda/ui/gui/__init__.py
> +++ b/pyanaconda/ui/gui/__init__.py
> @@ -301,8 +301,6 @@ class GraphicalUserInterface(UserInterface):
>          return isinstance(obj, StandaloneSpoke)
>  
>      def setup(self, data):
> -        busyCursor()
> -
>          self._actions = self.getActionClasses(self._list_hubs())
>          self.data = data
>  
> diff --git a/pyanaconda/ui/gui/utils.py b/pyanaconda/ui/gui/utils.py
> index c0682ea..c4fd214 100644
> --- a/pyanaconda/ui/gui/utils.py
> +++ b/pyanaconda/ui/gui/utils.py
> @@ -175,10 +175,16 @@ def timed_action(delay=300, threshold=750, busy_cursor=True):
>  
>  def busyCursor():
>      window = Gdk.get_default_root_window()
> +    if not window:
> +        return
> +
>      window.set_cursor(Gdk.Cursor(Gdk.CursorType.WATCH))
>  
>  def unbusyCursor():
>      window = Gdk.get_default_root_window()
> +    if not window:
> +        return
> +
>      window.set_cursor(Gdk.Cursor(Gdk.CursorType.ARROW))
I wish this would be all we need, but there seems to be a bigger issue
somewhere. First of all -- this doesn't happen on RHEL 7.0 GA, but when
you apply an updates.img from the current rhel7-branch it happens? What
has changed and started causing this issue? The other issue is that when
clicking the info/warning/error bar e.g. in the Custom partitioning
spoke a traceback appears ending with "Gtk failed to initialize". So it
seems to me that we do something wrong with X/Gdk/Gtk in general.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list