mirror of
https://github.com/brl/mutter.git
synced 2025-03-25 04:33:52 +00:00
wayland: Support programmatically resizing the stage
This will call into Cogl and ask it to resize the framebuffer which will then update the underlying EGL surface.
This commit is contained in:
parent
838fc6276f
commit
dd64ad1e42
@ -119,6 +119,18 @@ clutter_stage_wayland_set_fullscreen (ClutterStageWindow *stage_window,
|
|||||||
g_warning (G_STRLOC ": There is no Wayland API for un-fullscreening now");
|
g_warning (G_STRLOC ": There is no Wayland API for un-fullscreening now");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clutter_stage_wayland_resize (ClutterStageWindow *stage_window,
|
||||||
|
gint width,
|
||||||
|
gint height)
|
||||||
|
{
|
||||||
|
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
|
||||||
|
|
||||||
|
/* Resize preserving top left */
|
||||||
|
cogl_wayland_onscreen_resize (stage_cogl->onscreen, width, height, 0, 0);
|
||||||
|
_clutter_stage_window_redraw (stage_window);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
clutter_stage_wayland_init (ClutterStageWayland *stage_wayland)
|
clutter_stage_wayland_init (ClutterStageWayland *stage_wayland)
|
||||||
{
|
{
|
||||||
@ -131,6 +143,7 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
|
|||||||
|
|
||||||
iface->realize = clutter_stage_wayland_realize;
|
iface->realize = clutter_stage_wayland_realize;
|
||||||
iface->set_fullscreen = clutter_stage_wayland_set_fullscreen;
|
iface->set_fullscreen = clutter_stage_wayland_set_fullscreen;
|
||||||
|
iface->resize = clutter_stage_wayland_resize;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
x
Reference in New Issue
Block a user