Adding NoIconify and AlwaysOnTop GLFW window hints
This commit is contained in:
parent
3c6f33365b
commit
dd5e0d8b09
|
@ -46,6 +46,16 @@ type WindowConfig struct {
|
||||||
// Undecorated Window ommits the borders and decorations (close button, etc.).
|
// Undecorated Window ommits the borders and decorations (close button, etc.).
|
||||||
Undecorated bool
|
Undecorated bool
|
||||||
|
|
||||||
|
// NoIconify specifies whether fullscreen windows should not automatically
|
||||||
|
// iconify (and restore the previous video mode) on focus loss.
|
||||||
|
NoIconify bool
|
||||||
|
|
||||||
|
// AlwaysOnTop specifies whether the windowed mode window will be floating
|
||||||
|
// above other regular windows, also called topmost or always-on-top.
|
||||||
|
// This is intended primarily for debugging purposes and cannot be used to
|
||||||
|
// implement proper full screen windows.
|
||||||
|
AlwaysOnTop bool
|
||||||
|
|
||||||
// VSync (vertical synchronization) synchronizes Window's framerate with the framerate of
|
// VSync (vertical synchronization) synchronizes Window's framerate with the framerate of
|
||||||
// the monitor.
|
// the monitor.
|
||||||
VSync bool
|
VSync bool
|
||||||
|
@ -100,6 +110,8 @@ func NewWindow(cfg WindowConfig) (*Window, error) {
|
||||||
|
|
||||||
glfw.WindowHint(glfw.Resizable, bool2int[cfg.Resizable])
|
glfw.WindowHint(glfw.Resizable, bool2int[cfg.Resizable])
|
||||||
glfw.WindowHint(glfw.Decorated, bool2int[!cfg.Undecorated])
|
glfw.WindowHint(glfw.Decorated, bool2int[!cfg.Undecorated])
|
||||||
|
glfw.WindowHint(glfw.Floating, bool2int[cfg.AlwaysOnTop])
|
||||||
|
glfw.WindowHint(glfw.AutoIconify, bool2int[!cfg.NoIconify])
|
||||||
|
|
||||||
var share *glfw.Window
|
var share *glfw.Window
|
||||||
if currWin != nil {
|
if currWin != nil {
|
||||||
|
|
Loading…
Reference in New Issue