8719: AttributeError: 'NoneType' object has no attribute 'set_cursor'
This commit is contained in:
parent
6cc3ec2eff
commit
4358bb9f94
@ -532,16 +532,17 @@ class DisplayState(Callback):
|
||||
return
|
||||
else:
|
||||
self.busy = value
|
||||
if value:
|
||||
self.cursor = self.window.get_window().get_cursor()
|
||||
self.window.get_window().set_cursor(self.BUSY_CURSOR)
|
||||
else:
|
||||
self.window.get_window().set_cursor(self.cursor)
|
||||
if self.window.get_window().is_visible():
|
||||
#avoid critical gdk error:
|
||||
#Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed
|
||||
#only process events if window is actually visible
|
||||
process_pending_events()
|
||||
if self.window.get_window():
|
||||
if value:
|
||||
self.cursor = self.window.get_window().get_cursor()
|
||||
self.window.get_window().set_cursor(self.BUSY_CURSOR)
|
||||
else:
|
||||
self.window.get_window().set_cursor(self.cursor)
|
||||
if self.window.get_window().is_visible():
|
||||
#avoid critical gdk error:
|
||||
#Gdk-CRITICAL **: gdk_error_trap_pop_internal: assertion `trap != NULL' failed
|
||||
#only process events if window is actually visible
|
||||
process_pending_events()
|
||||
|
||||
def set_open_widget(self, widget):
|
||||
self.widget = widget
|
||||
|
Loading…
Reference in New Issue
Block a user