From 1443dec66b161528dab3ef6b91d288b4aeac5194 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Sun, 27 Jan 2008 11:12:21 +0000 Subject: [PATCH] Added call to XSetTransientForHint after disabling/activating window decorations. --- Source/OpenTK/Platform/X11/X11GLNative.cs | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/X11/X11GLNative.cs b/Source/OpenTK/Platform/X11/X11GLNative.cs index 013d5cae..cdd80741 100644 --- a/Source/OpenTK/Platform/X11/X11GLNative.cs +++ b/Source/OpenTK/Platform/X11/X11GLNative.cs @@ -698,7 +698,15 @@ namespace OpenTK.Platform.X11 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() @@ -721,7 +729,15 @@ namespace OpenTK.Platform.X11 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()