Browse Source

add x11 implementation.

pull/3943/head
Dan Walmsley 6 years ago
parent
commit
4fe8e41646
  1. 17
      src/Avalonia.X11/X11Window.cs

17
src/Avalonia.X11/X11Window.cs

@ -44,6 +44,8 @@ namespace Avalonia.X11
private HashSet<X11Window> _transientChildren = new HashSet<X11Window>(); private HashSet<X11Window> _transientChildren = new HashSet<X11Window>();
private X11Window _transientParent; private X11Window _transientParent;
private double? _scalingOverride; private double? _scalingOverride;
private bool _disabled;
public object SyncRoot { get; } = new object(); public object SyncRoot { get; } = new object();
class InputEventContainer class InputEventContainer
@ -773,6 +775,11 @@ namespace Avalonia.X11
bool ActivateTransientChildIfNeeded() bool ActivateTransientChildIfNeeded()
{ {
if(_disabled)
{
return false;
}
if (_transientChildren.Count == 0) if (_transientChildren.Count == 0)
return false; return false;
var child = _transientChildren.First(); var child = _transientChildren.First();
@ -1035,12 +1042,18 @@ namespace Avalonia.X11
ChangeWMAtoms(value, _x11.Atoms._NET_WM_STATE_ABOVE); ChangeWMAtoms(value, _x11.Atoms._NET_WM_STATE_ABOVE);
} }
public void ShowDialog(IWindowImpl parent) public void SetParent(IWindowImpl parent)
{ {
SetTransientParent((X11Window)parent); SetTransientParent((X11Window)parent);
ShowCore();
} }
public void SetEnabled(bool enable)
{
_disabled = !enable;
}
public Action GotInputWhenDisabled { get; set; }
public void SetIcon(IWindowIconImpl icon) public void SetIcon(IWindowIconImpl icon)
{ {
if (icon != null) if (icon != null)

Loading…
Cancel
Save