mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-05-17 03:51:17 +00:00
[client] wayland: implement full screen handling
Implement waylandSetFullscreen and waylandGetFullscreen.
This commit is contained in:
parent
265370b0f5
commit
6206d5dec4
@ -59,6 +59,7 @@ struct WaylandDSState
|
|||||||
struct wl_compositor * compositor;
|
struct wl_compositor * compositor;
|
||||||
|
|
||||||
int32_t width, height;
|
int32_t width, height;
|
||||||
|
bool fullscreen;
|
||||||
uint32_t resizeSerial;
|
uint32_t resizeSerial;
|
||||||
bool configured;
|
bool configured;
|
||||||
|
|
||||||
@ -437,6 +438,14 @@ static void xdgToplevelConfigure(void * data, struct xdg_toplevel * xdgToplevel,
|
|||||||
{
|
{
|
||||||
wm.width = width;
|
wm.width = width;
|
||||||
wm.height = height;
|
wm.height = height;
|
||||||
|
wm.fullscreen = false;
|
||||||
|
|
||||||
|
enum xdg_toplevel_state * state;
|
||||||
|
wl_array_for_each(state, states)
|
||||||
|
{
|
||||||
|
if (*state == XDG_TOPLEVEL_STATE_FULLSCREEN)
|
||||||
|
wm.fullscreen = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct xdg_toplevel_listener xdgToplevelListener = {
|
static const struct xdg_toplevel_listener xdgToplevelListener = {
|
||||||
@ -623,13 +632,15 @@ static void waylandSetWindowSize(int x, int y)
|
|||||||
|
|
||||||
static void waylandSetFullscreen(bool fs)
|
static void waylandSetFullscreen(bool fs)
|
||||||
{
|
{
|
||||||
// FIXME: implement.
|
if (fs)
|
||||||
|
xdg_toplevel_set_fullscreen(wm.xdgToplevel, NULL);
|
||||||
|
else
|
||||||
|
xdg_toplevel_unset_fullscreen(wm.xdgToplevel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool waylandGetFullscreen(void)
|
static bool waylandGetFullscreen(void)
|
||||||
{
|
{
|
||||||
// FIXME: implement.
|
return wm.fullscreen;
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void relativePointerMotionHandler(void * data,
|
static void relativePointerMotionHandler(void * data,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user