mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] x11: set window posision before entering fullscreen
This fixes an issue where the window position would be ignored if the application was launched in full screen mode from the command line causing the client to enter full screen on the wrong monitor in multi-monitor configurations.
This commit is contained in:
parent
76d2c69b46
commit
d7704b13c0
@ -398,23 +398,14 @@ static bool x11Init(const LG_DSInitParams params)
|
||||
);
|
||||
}
|
||||
|
||||
Atom wmState[3] = {0};
|
||||
int wmStateCount = 0;
|
||||
|
||||
if (params.fullscreen)
|
||||
{
|
||||
x11.fullscreen = true;
|
||||
wmState[wmStateCount++] = x11atoms._NET_WM_STATE_FULLSCREEN;
|
||||
}
|
||||
|
||||
if (params.maximize)
|
||||
{
|
||||
wmState[wmStateCount++] = x11atoms._NET_WM_STATE_MAXIMIZED_HORZ;
|
||||
wmState[wmStateCount++] = x11atoms._NET_WM_STATE_MAXIMIZED_VERT;
|
||||
}
|
||||
Atom wmState[2] =
|
||||
{
|
||||
x11atoms._NET_WM_STATE_MAXIMIZED_HORZ,
|
||||
x11atoms._NET_WM_STATE_MAXIMIZED_VERT
|
||||
};
|
||||
|
||||
if (wmStateCount)
|
||||
{
|
||||
XChangeProperty(
|
||||
x11.display,
|
||||
x11.window,
|
||||
@ -423,7 +414,7 @@ static bool x11Init(const LG_DSInitParams params)
|
||||
32,
|
||||
PropModeReplace,
|
||||
(unsigned char *)&wmState,
|
||||
wmStateCount
|
||||
2
|
||||
);
|
||||
}
|
||||
|
||||
@ -664,6 +655,9 @@ static bool x11Init(const LG_DSInitParams params)
|
||||
if (!params.center)
|
||||
XMoveWindow(x11.display, x11.window, params.x, params.y);
|
||||
|
||||
if (params.fullscreen)
|
||||
x11SetFullscreen(true);
|
||||
|
||||
XSetLocaleModifiers(""); // Load XMODIFIERS
|
||||
x11.xim = XOpenIM(x11.display, 0, 0, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user