mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-08-09 20:24:14 +00:00
[client] ds: added new getFullscreen
operation
As the window manager may change our mode to full screen without our request we must ask the ds backend for the current state when we want to toggle the mode.
This commit is contained in:
@@ -452,6 +452,11 @@ static void sdlSetFullscreen(bool fs)
|
||||
SDL_SetWindowFullscreen(sdl.window, fs ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0);
|
||||
}
|
||||
|
||||
static bool sdlGetFullscreen(void)
|
||||
{
|
||||
return (SDL_GetWindowFlags(sdl.window) & SDL_WINDOW_FULLSCREEN_DESKTOP) != 0;
|
||||
}
|
||||
|
||||
struct LG_DisplayServerOps LGDS_SDL =
|
||||
{
|
||||
.probe = sdlProbe,
|
||||
@@ -482,6 +487,7 @@ struct LG_DisplayServerOps LGDS_SDL =
|
||||
.wait = sdlWait,
|
||||
.setWindowSize = sdlSetWindowSize,
|
||||
.setFullscreen = sdlSetFullscreen,
|
||||
.getFullscreen = sdlGetFullscreen,
|
||||
|
||||
/* SDL does not have clipboard support */
|
||||
.cbInit = NULL,
|
||||
|
@@ -1026,6 +1026,11 @@ static void x11SetFullscreen(bool fs)
|
||||
SubstructureNotifyMask | SubstructureRedirectMask, &e);
|
||||
}
|
||||
|
||||
static bool x11GetFullscreen(void)
|
||||
{
|
||||
return x11.fullscreen;
|
||||
}
|
||||
|
||||
static bool x11CBInit()
|
||||
{
|
||||
x11.aSelection = XInternAtom(x11.display, "CLIPBOARD" , False);
|
||||
@@ -1380,6 +1385,7 @@ struct LG_DisplayServerOps LGDS_X11 =
|
||||
.wait = x11Wait,
|
||||
.setWindowSize = x11SetWindowSize,
|
||||
.setFullscreen = x11SetFullscreen,
|
||||
.getFullscreen = x11GetFullscreen,
|
||||
|
||||
.cbInit = x11CBInit,
|
||||
.cbNotice = x11CBNotice,
|
||||
|
Reference in New Issue
Block a user