mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-29 10:06:28 +00:00
[client] x11: don't report borders if in fullscreen mode
This commit is contained in:
parent
2eac3dcb56
commit
cfa9171465
@ -57,6 +57,8 @@ struct X11DSState
|
|||||||
bool keyboardGrabbed;
|
bool keyboardGrabbed;
|
||||||
bool entered;
|
bool entered;
|
||||||
bool focused;
|
bool focused;
|
||||||
|
bool fullscreen;
|
||||||
|
|
||||||
struct Rect rect;
|
struct Rect rect;
|
||||||
struct Border border;
|
struct Border border;
|
||||||
|
|
||||||
@ -447,6 +449,13 @@ static int x11EventThread(void * unused)
|
|||||||
x11.rect.h = xe.xconfigure.height;
|
x11.rect.h = xe.xconfigure.height;
|
||||||
|
|
||||||
app_updateWindowPos(x, y);
|
app_updateWindowPos(x, y);
|
||||||
|
|
||||||
|
if (x11.fullscreen)
|
||||||
|
{
|
||||||
|
struct Border border = {0};
|
||||||
|
app_handleResizeEvent(x11.rect.w, x11.rect.h, border);
|
||||||
|
}
|
||||||
|
else
|
||||||
app_handleResizeEvent(x11.rect.w, x11.rect.h, x11.border);
|
app_handleResizeEvent(x11.rect.w, x11.rect.h, x11.border);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -479,6 +488,31 @@ static int x11EventThread(void * unused)
|
|||||||
xe.xproperty.state != PropertyNewValue)
|
xe.xproperty.state != PropertyNewValue)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
if (xe.xproperty.atom == x11.aNetWMState)
|
||||||
|
{
|
||||||
|
Atom type;
|
||||||
|
int fmt;
|
||||||
|
unsigned long num, bytes;
|
||||||
|
unsigned char *data;
|
||||||
|
|
||||||
|
if (XGetWindowProperty(x11.display, x11.window,
|
||||||
|
x11.aNetWMState, 0, ~0L, False, AnyPropertyType,
|
||||||
|
&type, &fmt, &num, &bytes, &data) != Success)
|
||||||
|
break;
|
||||||
|
|
||||||
|
bool fullscreen = false;
|
||||||
|
for(int i = 0; i < num; ++i)
|
||||||
|
{
|
||||||
|
Atom prop = ((Atom *)data)[i];
|
||||||
|
if (prop == x11.aNetWMStateFullscreen)
|
||||||
|
fullscreen = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
x11.fullscreen = fullscreen;
|
||||||
|
XFree(data);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (xe.xproperty.atom == x11.aNetFrameExtents)
|
if (xe.xproperty.atom == x11.aNetFrameExtents)
|
||||||
{
|
{
|
||||||
Atom type;
|
Atom type;
|
||||||
@ -969,6 +1003,9 @@ static void x11SetWindowSize(int w, int h)
|
|||||||
|
|
||||||
static void x11SetFullscreen(bool fs)
|
static void x11SetFullscreen(bool fs)
|
||||||
{
|
{
|
||||||
|
if (x11.fullscreen == fs)
|
||||||
|
return;
|
||||||
|
|
||||||
XEvent e =
|
XEvent e =
|
||||||
{
|
{
|
||||||
.xclient = {
|
.xclient = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user