Browse Source
X11: re-read _NET_WORKAREA on WM PropertyNotify (#21651)
Co-authored-by: lucas <lucas@rxmusic.com>
pull/21710/head
lambgoesbaa
3 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
8 additions and
0 deletions
-
src/Avalonia.X11/Screens/X11Screen.Providers.cs
|
|
|
@ -130,6 +130,14 @@ internal partial class X11Screens |
|
|
|
|
|
|
|
if (_scalingProvider is IScalingProviderWithChanges scalingWithChanges) |
|
|
|
scalingWithChanges.SettingsChanged += () => Changed?.Invoke(); |
|
|
|
|
|
|
|
platform.Globals.RootPropertyChanged += OnRootPropertyChanged; |
|
|
|
} |
|
|
|
|
|
|
|
private void OnRootPropertyChanged(IntPtr atom) |
|
|
|
{ |
|
|
|
if (atom == _x11.Atoms._NET_WORKAREA) |
|
|
|
Dispatcher.UIThread.Post(() => Changed?.Invoke(), DispatcherPriority.Normal); |
|
|
|
} |
|
|
|
|
|
|
|
private void OnEvent(ref XEvent ev) |
|
|
|
|