mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-11-22 10:29:47 +00:00
Fix the engine window frame on windows
Four things came out of testing on windows. The window settings were hidden outside of wayland because the check used the backend name, while the bar height matters wherever the engine draws the frame. The window now reports that (hasEngineFrame: barEnabled on wayland, engineFrame on glfw) and the display page asks for it. Only the live resize switch stays wayland specific, since the glfw backend always draws a fresh frame. The simplified mode is gone: when the frame is active and the surface has alpha, the shadow and the outer resize border are always there. The bar and its controls are drawn even when the font is missing: the early return used to make the whole bar invisible while its hit zones kept working. GLFW rewrites the window style on every mode change and dropped the thick frame the native resize border and snapping need, so the frame is set up again after such a change. Windows runs a modal loop while a window border is dragged and the main loop is blocked inside it, which froze the content during a resize. The backend draws and presents a frame from the refresh callback now, and skips the framerate limit there.
This commit is contained in:
parent
4bc81af726
commit
68d4214627
11 changed files with 96 additions and 52 deletions
|
|
@ -66,16 +66,16 @@ function on_open()
|
|||
"</select>", app.get_setting("display.window-mode"))
|
||||
)
|
||||
|
||||
-- these only affect the window frame the native wayland backend draws
|
||||
if app.get_window_backend() == "wayland" then
|
||||
-- the bar height matters wherever the engine draws the window frame
|
||||
if app.has_engine_window_frame() then
|
||||
create_checkbox(
|
||||
"display.compact-window-bar", "Narrow Window Bar",
|
||||
"display.compact-window-bar.tooltip"
|
||||
)
|
||||
create_checkbox(
|
||||
"display.simple-window", "Simple Window",
|
||||
"display.simple-window.tooltip"
|
||||
)
|
||||
end
|
||||
-- live rendering only has the cached frame as its alternative, which is
|
||||
-- what the native wayland backend does
|
||||
if app.get_window_backend() == "wayland" then
|
||||
create_checkbox(
|
||||
"display.live-resize", "Live Window Resize",
|
||||
"display.live-resize.tooltip"
|
||||
|
|
|
|||
|
|
@ -119,10 +119,8 @@ settings.Clouds quality=Качество облаков
|
|||
settings.Acoustic effects=Акустические эффекты
|
||||
settings.Microphone access=Доступ к микрофону
|
||||
settings.Narrow Window Bar=Узкая шапка окна
|
||||
settings.Simple Window=Простое окно
|
||||
settings.Live Window Resize=Живой ресайз окна
|
||||
settings.display.compact-window-bar.tooltip=Шапка окна высотой 24 px вместо 48 px
|
||||
settings.display.simple-window.tooltip=Без тени и внешней рамки ресайза
|
||||
settings.display.live-resize.tooltip=Перерисовывать содержимое окна при изменении размера (выключено — последний кадр растягивается)
|
||||
|
||||
# Управление
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue