(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.
This commit is contained in:
Adam 2024-06-29 19:26:01 -04:00 committed by GitHub
parent e981fe46b5
commit 3bb27082ae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -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,

View File

@ -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},
}