From 3bb27082aea3f414bb5e016348bf0e572a7d48f8 Mon Sep 17 00:00:00 2001 From: Adam Date: Sat, 29 Jun 2024 19:26:01 -0400 Subject: [PATCH] (fix): passed missing core.window to set_window_mode call (#1836) * (fix): passed missing core.window to set_window_mode call * Propogated fix to calls made from TitleView. --- data/core/commands/core.lua | 2 +- data/core/titleview.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/core/commands/core.lua b/data/core/commands/core.lua index cdf8d421..878e6230 100644 --- a/data/core/commands/core.lua +++ b/data/core/commands/core.lua @@ -42,7 +42,7 @@ command.add(nil, { if fullscreen then restore_title_view = core.title_view.visible end - system.set_window_mode(fullscreen and "fullscreen" or "normal") + system.set_window_mode(core.window, fullscreen and "fullscreen" or "normal") core.show_title_bar(not fullscreen and restore_title_view) core.title_view:configure_hit_test(not fullscreen and restore_title_view) end, diff --git a/data/core/titleview.lua b/data/core/titleview.lua index 482d6c8e..35dbaf5f 100644 --- a/data/core/titleview.lua +++ b/data/core/titleview.lua @@ -12,15 +12,15 @@ local icon_colors = { }; local restore_command = { - symbol = "w", action = function() system.set_window_mode("normal") end + symbol = "w", action = function() system.set_window_mode(core.window, "normal") end } local maximize_command = { - symbol = "W", action = function() system.set_window_mode("maximized") end + symbol = "W", action = function() system.set_window_mode(core.window, "maximized") end } local title_commands = { - {symbol = "_", action = function() system.set_window_mode("minimized") end}, + {symbol = "_", action = function() system.set_window_mode(core.window, "minimized") end}, maximize_command, {symbol = "X", action = function() core.quit() end}, }