Skip to content

Commit 001e83a

Browse files
committed
wayland: warn when custom shortcuts are set
1 parent fd43b15 commit 001e83a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

safeeyes/config/locale/safeeyes.pot

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,3 +561,6 @@ msgstr ""
561561
#, python-format
562562
msgid "Old stylesheet found at '%(old)s', ignoring. For custom styles, create a new stylesheet in '%(new)s' instead."
563563
msgstr ""
564+
565+
msgid "Customizing the postpone and skip shortcuts does not work on Wayland."
566+
msgstr ""

safeeyes/ui/break_screen.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ def initialize(self, config):
7171
self.enable_postpone = config.get("allow_postpone", False)
7272
self.keycode_shortcut_postpone = config.get("shortcut_postpone", 65)
7373
self.keycode_shortcut_skip = config.get("shortcut_skip", 9)
74+
75+
if self.context["is_wayland"] and (
76+
self.keycode_shortcut_postpone != 65 or self.keycode_shortcut_skip != 9
77+
):
78+
logging.warning(
79+
_(
80+
"Customizing the postpone and skip shortcuts does not work on "
81+
"Wayland."
82+
)
83+
)
84+
7485
self.shortcut_disable_time = config.get("shortcut_disable_time", 2)
7586
self.strict_break = config.get("strict_break", False)
7687

0 commit comments

Comments
 (0)