mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-24 21:20:59 +00:00
Added call to XSetTransientForHint after disabling/activating window decorations.
This commit is contained in:
parent
ab1bac702a
commit
1443dec66b
|
@ -698,7 +698,15 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
void DisableWindowDecorations()
|
void DisableWindowDecorations()
|
||||||
{
|
{
|
||||||
if (DisableMotifDecorations()) { Debug.Print("Removed decorations through motif."); return; }
|
bool removed = false;
|
||||||
|
if (DisableMotifDecorations()) { Debug.Print("Removed decorations through motif."); removed = true; }
|
||||||
|
|
||||||
|
if (removed)
|
||||||
|
{
|
||||||
|
Functions.XSetTransientForHint(API.DefaultDisplay, this.Handle, this.window.RootWindow);
|
||||||
|
Functions.XUnmapWindow(API.DefaultDisplay, this.Handle);
|
||||||
|
Functions.XMapWindow(API.DefaultDisplay, this.Handle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DisableMotifDecorations()
|
bool DisableMotifDecorations()
|
||||||
|
@ -721,7 +729,15 @@ namespace OpenTK.Platform.X11
|
||||||
|
|
||||||
void EnableWindowDecorations()
|
void EnableWindowDecorations()
|
||||||
{
|
{
|
||||||
if (EnableMotifDecorations()) { Debug.Print("Added decorations through motif."); return; }
|
bool activated = false;
|
||||||
|
if (EnableMotifDecorations()) { Debug.Print("Activated decorations through motif."); activated = true; }
|
||||||
|
|
||||||
|
if (activated)
|
||||||
|
{
|
||||||
|
Functions.XSetTransientForHint(API.DefaultDisplay, this.Handle, IntPtr.Zero);
|
||||||
|
Functions.XUnmapWindow(API.DefaultDisplay, this.Handle);
|
||||||
|
Functions.XMapWindow(API.DefaultDisplay, this.Handle);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EnableMotifDecorations()
|
bool EnableMotifDecorations()
|
||||||
|
|
Loading…
Reference in a new issue