window: Allow clients to choose the fullscreen method
This commit is contained in:
committed by
Kristian Høgsberg
parent
038b9dc8ec
commit
5403f5274d
+10
-1
@@ -219,6 +219,7 @@ struct window {
|
|||||||
cairo_surface_t *cairo_surface;
|
cairo_surface_t *cairo_surface;
|
||||||
|
|
||||||
int resizing;
|
int resizing;
|
||||||
|
int fullscreen_method;
|
||||||
|
|
||||||
window_key_handler_t key_handler;
|
window_key_handler_t key_handler;
|
||||||
window_keyboard_focus_handler_t keyboard_focus_handler;
|
window_keyboard_focus_handler_t keyboard_focus_handler;
|
||||||
@@ -3334,7 +3335,7 @@ window_set_fullscreen(struct window *window, int fullscreen)
|
|||||||
window->type = TYPE_FULLSCREEN;
|
window->type = TYPE_FULLSCREEN;
|
||||||
window->saved_allocation = window->allocation;
|
window->saved_allocation = window->allocation;
|
||||||
wl_shell_surface_set_fullscreen(window->shell_surface,
|
wl_shell_surface_set_fullscreen(window->shell_surface,
|
||||||
WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT,
|
window->fullscreen_method,
|
||||||
0, NULL);
|
0, NULL);
|
||||||
} else {
|
} else {
|
||||||
window->type = TYPE_TOPLEVEL;
|
window->type = TYPE_TOPLEVEL;
|
||||||
@@ -3345,6 +3346,13 @@ window_set_fullscreen(struct window *window, int fullscreen)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
window_set_fullscreen_method(struct window *window,
|
||||||
|
enum wl_shell_surface_fullscreen_method method)
|
||||||
|
{
|
||||||
|
window->fullscreen_method = method;
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
window_is_maximized(struct window *window)
|
window_is_maximized(struct window *window)
|
||||||
{
|
{
|
||||||
@@ -3558,6 +3566,7 @@ window_create_internal(struct display *display,
|
|||||||
window->type = type;
|
window->type = type;
|
||||||
window->input_region = NULL;
|
window->input_region = NULL;
|
||||||
window->opaque_region = NULL;
|
window->opaque_region = NULL;
|
||||||
|
window->fullscreen_method = WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT;
|
||||||
|
|
||||||
if (display->dpy)
|
if (display->dpy)
|
||||||
#ifdef HAVE_CAIRO_EGL
|
#ifdef HAVE_CAIRO_EGL
|
||||||
|
|||||||
@@ -301,6 +301,9 @@ window_is_fullscreen(struct window *window);
|
|||||||
void
|
void
|
||||||
window_set_fullscreen(struct window *window, int fullscreen);
|
window_set_fullscreen(struct window *window, int fullscreen);
|
||||||
|
|
||||||
|
void
|
||||||
|
window_set_fullscreen_method(struct window *window,
|
||||||
|
enum wl_shell_surface_fullscreen_method method);
|
||||||
int
|
int
|
||||||
window_is_maximized(struct window *window);
|
window_is_maximized(struct window *window);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user