Skip to content

Commit 020c523

Browse files
Fix topmenu handling without foreground app
1 parent 3f52960 commit 020c523

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal_filesystem/lib/mpos/ui/topmenu.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ def close_drawer(to_launcher=False):
4646
global drawer_open, drawer
4747
if drawer_open:
4848
drawer_open=False
49-
if not to_launcher and not "launcher" in get_foreground_app():
49+
fg = get_foreground_app()
50+
if not to_launcher and fg is not None and not "launcher" in fg:
5051
print(f"close_drawer: also closing bar because to_launcher is {to_launcher} and foreground_app_name is {get_foreground_app()}")
5152
close_bar(False)
5253
WidgetAnimator.hide_widget(drawer, anim_type="slide_up", duration=1000, delay=0)

0 commit comments

Comments
 (0)