Skip to content

Commit

Permalink
fix dummy quit menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Nov 25, 2018
1 parent ea0c824 commit 8263b9c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions gnomehud/utils/menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class DbusMenu:

def __init__(self):
self.session = dbus.SessionBus()
self.screen = Gdk.Screen.get_default()
self.gdk_window = self.screen.get_active_window()
self.matcher = Bamf.Matcher.get_default()
self.window = self.matcher.get_active_window()
self.xid = self.window.get_xid()
Expand Down Expand Up @@ -79,10 +81,7 @@ def activate_gtkmenu_action(self, action, prefix, path):
iface.Activate(action.replace(prefix, ''), [], dict())

def close_window(self):
screen = Gdk.Screen.get_default()
window = screen.get_active_window()

window.destroy()
self.gdk_window.destroy()

def explore_dbusmenu(self):
name = 'com.canonical.AppMenu.Registrar'
Expand Down

0 comments on commit 8263b9c

Please sign in to comment.