@ -27,7 +27,7 @@ using static Avalonia.X11.XLib;
// ReSharper disable StringLiteralTypo
namespace Avalonia.X11
{
unsafe partial class X11Window : IWindowImpl , IPopupImpl , IXI2Client
internal unsafe partial class X11Window : IWindowImpl , IPopupImpl , IXI2Client
{
private readonly AvaloniaX11Platform _ platform ;
private readonly bool _ popup ;
@ -59,7 +59,7 @@ namespace Avalonia.X11
private bool _ useRenderWindow = false ;
private bool _ usePositioningFlags = false ;
enum XSyncState
private enum XSyncState
{
None ,
WaitConfigure ,
@ -219,7 +219,7 @@ namespace Avalonia.X11
} ) ;
}
class SurfaceInfo : EglGlPlatformSurface . IEglWindowGlPlatformSurfaceInfo
private class SurfaceInfo : EglGlPlatformSurface . IEglWindowGlPlatformSurfaceInfo
{
private readonly X11Window _ window ;
private readonly IntPtr _d isplay ;
@ -249,7 +249,7 @@ namespace Avalonia.X11
public double Scaling = > _ window . RenderScaling ;
}
void UpdateMotifHints ( )
private void UpdateMotifHints ( )
{
var functions = MotifFunctions . Move | MotifFunctions . Close | MotifFunctions . Resize |
MotifFunctions . Minimize | MotifFunctions . Maximize ;
@ -278,7 +278,7 @@ namespace Avalonia.X11
PropertyMode . Replace , ref hints , 5 ) ;
}
void UpdateSizeHints ( PixelSize ? preResize )
private void UpdateSizeHints ( PixelSize ? preResize )
{
var min = _ minMaxSize . minSize ;
var max = _ minMaxSize . maxSize ;
@ -386,7 +386,7 @@ namespace Avalonia.X11
public IRenderer CreateRenderer ( IRenderRoot root ) = >
new CompositingRenderer ( root , _ platform . Compositor , ( ) = > Surfaces ) ;
void OnEvent ( ref XEvent ev )
private void OnEvent ( ref XEvent ev )
{
if ( ev . type = = XEventName . MapNotify )
{
@ -668,7 +668,7 @@ namespace Avalonia.X11
}
static RawInputModifiers TranslateModifiers ( XModifierMask state )
private static RawInputModifiers TranslateModifiers ( XModifierMask state )
{
var rv = default ( RawInputModifiers ) ;
if ( state . HasAllFlags ( XModifierMask . Button1Mask ) )
@ -704,13 +704,13 @@ namespace Avalonia.X11
private double _ scaling = 1 ;
void ScheduleInput ( RawInputEventArgs args , ref XEvent xev )
private void ScheduleInput ( RawInputEventArgs args , ref XEvent xev )
{
_ x11 . LastActivityTimestamp = xev . ButtonEvent . time ;
ScheduleInput ( args ) ;
}
void DispatchInput ( RawInputEventArgs args )
private void DispatchInput ( RawInputEventArgs args )
{
Input ? . Invoke ( args ) ;
if ( ! args . Handled & & args is RawKeyEventArgsWithText text & & ! string . IsNullOrEmpty ( text . Text ) )
@ -746,8 +746,8 @@ namespace Avalonia.X11
_ rawEventGrouper . HandleEvent ( args ) ;
}
void MouseEvent ( RawPointerEventType type , ref XEvent ev , XModifierMask mods )
private void MouseEvent ( RawPointerEventType type , ref XEvent ev , XModifierMask mods )
{
var mev = new RawPointerEventArgs (
_ mouse , ( ulong ) ev . ButtonEvent . time . ToInt64 ( ) , _ inputRoot ,
@ -755,7 +755,7 @@ namespace Avalonia.X11
ScheduleInput ( mev , ref ev ) ;
}
void EnqueuePaint ( )
private void EnqueuePaint ( )
{
if ( ! _ triggeredExpose )
{
@ -767,8 +767,8 @@ namespace Avalonia.X11
} , DispatcherPriority . Render ) ;
}
}
void DoPaint ( )
private void DoPaint ( )
{
Paint ? . Invoke ( new Rect ( ) ) ;
if ( _ xSyncCounter ! = IntPtr . Zero & & _ xSyncState = = XSyncState . WaitPaint )
@ -819,8 +819,8 @@ namespace Avalonia.X11
return null ;
}
void Cleanup ( )
private void Cleanup ( )
{
if ( _ rawEventGrouper ! = null )
{
@ -871,7 +871,7 @@ namespace Avalonia.X11
}
}
bool ActivateTransientChildIfNeeded ( )
private bool ActivateTransientChildIfNeeded ( )
{
if ( _d isabled )
{
@ -923,9 +923,9 @@ namespace Avalonia.X11
Resize ( size , true , PlatformResizeReason . Layout ) ;
}
PixelSize ToPixelSize ( Size size ) = > new PixelSize ( ( int ) ( size . Width * RenderScaling ) , ( int ) ( size . Height * RenderScaling ) ) ;
void Resize ( Size clientSize , bool force , PlatformResizeReason reason )
private PixelSize ToPixelSize ( Size size ) = > new PixelSize ( ( int ) ( size . Width * RenderScaling ) , ( int ) ( size . Height * RenderScaling ) ) ;
private void Resize ( Size clientSize , bool force , PlatformResizeReason reason )
{
if ( ! force & & clientSize = = ClientSize )
return ;
@ -1020,7 +1020,7 @@ namespace Avalonia.X11
. OrderByDescending ( x = > x . Width + x . Height ) . FirstOrDefault ( ) ;
void SendNetWMMessage ( IntPtr message_type , IntPtr l0 ,
private void SendNetWMMessage ( IntPtr message_type , IntPtr l0 ,
IntPtr ? l1 = null , IntPtr ? l2 = null , IntPtr ? l3 = null , IntPtr ? l4 = null )
{
var xev = new XEvent
@ -1044,7 +1044,7 @@ namespace Avalonia.X11
}
void BeginMoveResize ( NetWmMoveResize side , PointerPressedEventArgs e )
private void BeginMoveResize ( NetWmMoveResize side , PointerPressedEventArgs e )
{
var pos = GetCursorPos ( _ x11 ) ;
XUngrabPointer ( _ x11 . Display , new IntPtr ( 0 ) ) ;
@ -1184,7 +1184,7 @@ namespace Avalonia.X11
ChangeWMAtoms ( ! value , _ x11 . Atoms . _ NET_WM_STATE_SKIP_TASKBAR ) ;
}
void ChangeWMAtoms ( bool enable , params IntPtr [ ] atoms )
private void ChangeWMAtoms ( bool enable , params IntPtr [ ] atoms )
{
if ( atoms . Length ! = 1 & & atoms . Length ! = 2 )
throw new ArgumentException ( ) ;