Wrap the glfw is fullscreen API

This commit is contained in:
Kovid Goyal 2021-11-11 12:46:13 +05:30
parent 9be37f7d2d
commit 60e91b018a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 11 additions and 0 deletions

View File

@ -599,6 +599,16 @@ toggle_fullscreen_for_os_window(OSWindow *w) {
return false;
}
bool
is_os_window_fullscreen(OSWindow *w) {
unsigned int flags = 0;
#ifdef __APPLE__
if (!OPT(macos_traditional_fullscreen)) flags = 1;
#endif
if (w && w->handle) return glfwIsFullscreen(w->handle, flags);
return false;
}
static bool
toggle_maximized_for_os_window(OSWindow *w) {
bool maximized = false;

View File

@ -321,3 +321,4 @@ void send_pending_click_to_window(Window*, void*);
void get_platform_dependent_config_values(void *glfw_window);
bool draw_window_title(OSWindow *window, const char *text, color_type fg, color_type bg, uint8_t *output_buf, size_t width, size_t height);
uint8_t* draw_single_ascii_char(const char ch, size_t *result_width, size_t *result_height);
bool is_os_window_fullscreen(OSWindow *);