Removed the extra title bar when return from fullscreen

This commit is contained in:
George Sokianos 2022-01-02 23:47:19 +00:00
parent 7bd164b17e
commit de6c0fd575
1 changed files with 6 additions and 2 deletions

8
data/core/commands/core.lua Executable file → Normal file
View File

@ -6,6 +6,7 @@ local LogView = require "core.logview"
local fullscreen = false
local restore_title_view = false
local function suggest_directory(text)
text = common.home_expand(text)
@ -27,9 +28,12 @@ command.add(nil, {
["core:toggle-fullscreen"] = function()
fullscreen = not fullscreen
if fullscreen then
restore_title_view = core.title_view.visible
end
system.set_window_mode(fullscreen and "fullscreen" or "normal")
core.show_title_bar(not fullscreen)
core.title_view:configure_hit_test(not fullscreen)
core.show_title_bar(not fullscreen and restore_title_view)
core.title_view:configure_hit_test(not fullscreen and restore_title_view)
end,
["core:reload-module"] = function()