You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
749 B
23 lines
749 B
1 year ago
|
using UnityEditor;
|
||
|
|
||
|
namespace FullscreenEditor.Linux {
|
||
|
internal static class NativeFullscreenHooks {
|
||
|
|
||
|
[InitializeOnLoadMethod]
|
||
|
private static void Init() {
|
||
|
if (!FullscreenUtility.IsLinux)
|
||
|
return;
|
||
|
|
||
|
FullscreenCallbacks.afterFullscreenOpen += (fs) => {
|
||
|
if (wmctrl.IsInstalled && !FullscreenPreferences.DoNotUseWmctrl.Value)
|
||
|
wmctrl.SetNativeFullscreen(true, fs.m_dst.Container);
|
||
|
};
|
||
|
FullscreenCallbacks.beforeFullscreenClose += (fs) => {
|
||
|
if (wmctrl.IsInstalled && !FullscreenPreferences.DoNotUseWmctrl.Value)
|
||
|
wmctrl.SetNativeFullscreen(false, fs.m_dst.Container);
|
||
|
};
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|