Describe the bug
When a Window is in fullscreen mode, the top "reveal bar" (the auto-hide title bar shown by WindowDrawnDecorations when the pointer moves to the top edge) acts as a window drag region. Dragging it starts a window move (BeginMoveDrag) on a fullscreen window: the window is moved off the fullscreen rectangle and the reveal bar / fullscreen chrome ends up in a broken state.
Root cause
In the Fluent theme template, the FullscreenPopover panel is marked with WindowDecorationProperties.ElementRole="TitleBar", i.e. it is registered as a drag region for non-client hit-testing:
src/Avalonia.Themes.Fluent/Controls/WindowDrawnDecorations.xaml
<WindowDrawnDecorationsContent.FullscreenPopover>
<Panel Height="{TemplateBinding DefaultTitleBarHeight}"
VerticalAlignment="Top"
Background="{DynamicResource SystemControlBackgroundChromeMediumLowBrush}"
WindowDecorationProperties.ElementRole="TitleBar">
In fullscreen the normal title bar (PART_TitleBar) is collapsed (IsVisible=False), so the popover is the only element with the TitleBar role, and dragging it triggers BeginMoveDrag on the fullscreen window. The reveal bar is a transient overlay (its purpose is to expose the caption buttons to leave fullscreen); it should not behave as a window drag handle.
To Reproduce
Steps to reproduce the behavior:
- Create a
Window with ExtendClientAreaToDecorationsHint="True".
- Put the window into fullscreen (
WindowState = WindowState.FullScreen).
- Move the pointer to the top edge so the reveal bar appears.
- Press and drag on the empty area of the reveal bar (not on a button).
Expected: nothing happens (a fullscreen window should not be movable).
Actual: the window starts moving / leaves the fullscreen rectangle and the reveal bar/chrome breaks.
Expected behavior
The fullscreen reveal bar should not be a window drag region; a fullscreen window should not be movable by dragging it.
Avalonia version
12.0.4
OS
Windows
Additional context
The reveal bar's panel role should be DecorationsElement instead of TitleBar, so it remains part of the non-client chrome but is not a drag handle. The caption buttons inside it keep their own roles (FullScreenButton, CloseButton) and stay functional.
Describe the bug
When a
Windowis in fullscreen mode, the top "reveal bar" (the auto-hide title bar shown byWindowDrawnDecorationswhen the pointer moves to the top edge) acts as a window drag region. Dragging it starts a window move (BeginMoveDrag) on a fullscreen window: the window is moved off the fullscreen rectangle and the reveal bar / fullscreen chrome ends up in a broken state.Root cause
In the Fluent theme template, the
FullscreenPopoverpanel is marked withWindowDecorationProperties.ElementRole="TitleBar", i.e. it is registered as a drag region for non-client hit-testing:src/Avalonia.Themes.Fluent/Controls/WindowDrawnDecorations.xamlIn fullscreen the normal title bar (
PART_TitleBar) is collapsed (IsVisible=False), so the popover is the only element with theTitleBarrole, and dragging it triggersBeginMoveDragon the fullscreen window. The reveal bar is a transient overlay (its purpose is to expose the caption buttons to leave fullscreen); it should not behave as a window drag handle.To Reproduce
Steps to reproduce the behavior:
WindowwithExtendClientAreaToDecorationsHint="True".WindowState = WindowState.FullScreen).Expected: nothing happens (a fullscreen window should not be movable).
Actual: the window starts moving / leaves the fullscreen rectangle and the reveal bar/chrome breaks.
Expected behavior
The fullscreen reveal bar should not be a window drag region; a fullscreen window should not be movable by dragging it.
Avalonia version
12.0.4
OS
Windows
Additional context
The reveal bar's panel role should be
DecorationsElementinstead ofTitleBar, so it remains part of the non-client chrome but is not a drag handle. The caption buttons inside it keep their own roles (FullScreenButton,CloseButton) and stay functional.