Merge pull request #97 from nwg-piotr/timeout
prevent from crash in Gdk.Monitor not detected
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
import gi
|
||||
import signal
|
||||
import subprocess
|
||||
import sys
|
||||
|
||||
import gi
|
||||
|
||||
gi.require_version('Gtk', '3.0')
|
||||
from gi.repository import Gtk, Gdk, GLib
|
||||
@@ -454,7 +455,7 @@ class EditorWrapper(object):
|
||||
"sway-workspaces",
|
||||
"scratchpad",
|
||||
"dwl-tags",
|
||||
"tray"]
|
||||
"tray"]
|
||||
|
||||
self.scrolled_window = builder.get_object("scrolled-window")
|
||||
|
||||
|
@@ -7,10 +7,11 @@ Author's email: nwg.piotr@gmail.com
|
||||
Copyright (c) 2021 Piotr Miller & Contributors
|
||||
License: MIT
|
||||
"""
|
||||
import sys
|
||||
import signal
|
||||
import gi
|
||||
import argparse
|
||||
import signal
|
||||
import sys
|
||||
|
||||
import gi
|
||||
|
||||
from nwg_panel.__about__ import __version__
|
||||
|
||||
@@ -50,9 +51,11 @@ from nwg_panel.modules.menu_start import MenuStart
|
||||
dir_name = os.path.dirname(__file__)
|
||||
|
||||
from nwg_panel import common
|
||||
|
||||
tray_available = False
|
||||
try:
|
||||
from nwg_panel.modules import sni_system_tray
|
||||
|
||||
tray_available = True
|
||||
except:
|
||||
print("Couldn't load system tray, is 'python-dbus' installed?", file=sys.stderr)
|
||||
@@ -420,7 +423,7 @@ def main():
|
||||
}
|
||||
for key in defaults:
|
||||
check_key(panel["menu-start-settings"], key, defaults[key])
|
||||
|
||||
|
||||
if panel["menu-start"] != "off":
|
||||
panel["menu-start-settings"]["horizontal-align"] = panel["menu-start"]
|
||||
|
||||
|
@@ -250,7 +250,8 @@ def list_outputs(sway=False, tree=None, silent=False):
|
||||
outputs_dict[item.name] = {"x": item.rect.x,
|
||||
"y": item.rect.y,
|
||||
"width": item.rect.width,
|
||||
"height": item.rect.height}
|
||||
"height": item.rect.height,
|
||||
"monitor": None}
|
||||
elif os.getenv('WAYLAND_DISPLAY') is not None:
|
||||
if not silent:
|
||||
print("Running on Wayland, but not sway")
|
||||
@@ -279,14 +280,16 @@ def list_outputs(sway=False, tree=None, silent=False):
|
||||
'y': y,
|
||||
'width': w,
|
||||
'height': h,
|
||||
'transform': transform}
|
||||
'transform': transform,
|
||||
'monitor': None}
|
||||
else:
|
||||
outputs_dict[name] = {'name': name,
|
||||
'x': x,
|
||||
'y': y,
|
||||
'width': h,
|
||||
'height': w,
|
||||
'transform': transform}
|
||||
'transform': transform,
|
||||
'monitor': None}
|
||||
else:
|
||||
print("'wlr-randr' command not found, terminating")
|
||||
sys.exit(1)
|
||||
|
Reference in New Issue
Block a user