From 0824cdf39d286a2d7447bf2ed203b95441f9a7c0 Mon Sep 17 00:00:00 2001 From: Clement Lefebvre Date: Fri, 28 Apr 2017 13:02:28 +0100 Subject: [PATCH] Fix get_origin calls in Betsy --- usr/lib/linuxmint/mintMenu/mintMenu.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/usr/lib/linuxmint/mintMenu/mintMenu.py b/usr/lib/linuxmint/mintMenu/mintMenu.py index 3092455..70cd375 100755 --- a/usr/lib/linuxmint/mintMenu/mintMenu.py +++ b/usr/lib/linuxmint/mintMenu/mintMenu.py @@ -752,9 +752,13 @@ class MenuWin( object ): ourHeight = self.mainwin.window.get_size()[1] + self.mainwin.offset # Get the dimensions/position of the widgetToAlignWith - print(self.applet.get_window().get_origin()) - entryX = self.applet.get_window().get_origin().x - entryY = self.applet.get_window().get_origin().y + try: + entryX = self.applet.get_window().get_origin().x + entryY = self.applet.get_window().get_origin().y + except: + # In Betsy get_origin returns an unamed tuple so the code above fails + entryX = self.applet.get_window().get_origin()[1] + entryY = self.applet.get_window().get_origin()[2] entryWidth, entryHeight = self.applet.get_allocation().width, self.applet.get_allocation().height entryHeight = entryHeight + self.mainwin.offset