Ensure that the widget is fully onscreen before taking a screenshot.

Otherwise X emits a BadMatch and gtk kills the process (!).
Fix #8220
This commit is contained in:
Marco Pesenti Gritti
2008-08-31 14:40:03 +02:00
parent 938e2e9648
commit 6e503b0a24
5 changed files with 29 additions and 7 deletions
+2 -2
View File
@@ -754,8 +754,8 @@ class Activity(Window, gtk.Container):
return {}
def take_screenshot(self):
if self.canvas and self.canvas.window:
self._preview.take_screenshot(self.canvas.window)
if self.canvas:
self._preview.take_screenshot(self.canvas)
def save(self):
"""Request that the activity is saved to the Journal.