Skip to content

Make fullscreen reveal bar non-draggable - #21548

Merged
MrJul merged 4 commits into
AvaloniaUI:mainfrom
massimopaganigh:fix/fullscreen-popover-not-draggable
Sep 15, 2026
Merged

MrJul merged 4 commits into
AvaloniaUI:mainfrom
massimopaganigh:fix/fullscreen-popover-not-draggable

Conversation

@massimopaganigh

Copy link
Copy Markdown
Contributor

What does the pull request do?

Marks the FullscreenPopover panel in WindowDrawnDecorations as DecorationsElement instead of TitleBar, so the fullscreen reveal bar is no longer registered as a window drag region.

What is the current behavior?

In fullscreen, the normal title bar (PART_TitleBar) is collapsed, so the reveal bar is the only element with ElementRole="TitleBar". Dragging its empty area starts BeginMoveDrag on the fullscreen window, moving it off the fullscreen rectangle and leaving the reveal bar / chrome in a broken state.

What is the updated/expected behavior?

The reveal bar is part of the non-client chrome but is not a drag handle, so a fullscreen window can no longer be moved by dragging it. The caption buttons inside the popover keep their own roles (FullScreenButton, CloseButton) and remain fully functional.

How was the solution implemented (if it's not obvious)?

One-line theme change in
src/Avalonia.Themes.Fluent/Controls/WindowDrawnDecorations.xaml:

-                   WindowDecorationProperties.ElementRole="TitleBar">
+                   WindowDecorationProperties.ElementRole="DecorationsElement">

Breaking changes

None. Behavioral change only: the fullscreen reveal bar is no longer a drag region (it should not have been one).

Fixed issues

Fixes #21547

@massimopaganigh

Copy link
Copy Markdown
Contributor Author

#21549

It's not related but let me know if it's a good idea.

@cla-avalonia

cla-avalonia commented Jun 11, 2026 •

Copy link
Copy Markdown
Collaborator
  • All contributors have signed the CLA.

@massimopaganigh

Copy link
Copy Markdown
Contributor Author

@cla-avalonia agree

@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.1.999-cibuild0066257-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul added bug backport-candidate-12.0.x Consider this PR for backporting to 12.0 branch labels Jun 11, 2026
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.1.999-cibuild0066329-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul added backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch and removed backport-candidate-12.0.x Consider this PR for backporting to 12.0 branch labels Jul 9, 2026
@MrJul

MrJul commented Sep 9, 2026

Copy link
Copy Markdown
Member

Since TitleBar is explicitly documented as:

The element acts as a titlebar drag area

I think the change makes sense.

Ideally, dragging the bar would restore the window to its normal state and continue the drag, matching what happens with a Maximized window on Windows. In practice, that will be quite hard to do correctly in a cross-platform way. Disabling the drag is the better behavior.

@MrJul MrJul left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also apply the change to Themes.Simple.
Edit: done.

…not-draggable

# Conflicts:
#	src/Avalonia.Themes.Fluent/Controls/WindowDrawnDecorations.xaml
#	src/Avalonia.Themes.Simple/Controls/WindowDrawnDecorations.xaml
@avaloniaui-bot

Copy link
Copy Markdown

You can test this PR using the following package version. 12.2.999-cibuild0069907-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul
MrJul added this pull request to the merge queue Sep 15, 2026
Merged via the queue into AvaloniaUI:main with commit 8a3af46 Sep 15, 2026
9 checks passed
MrJul added a commit to MrJul/Avalonia that referenced this pull request Sep 22, 2026
* Make fullscreen reveal bar non-draggable

* Also apply the change to the simple theme

---------

Co-authored-by: Julien Lebosquain 
@MrJul MrJul added backported-12.1.x and removed backport-candidate-12.1.x Consider this PR for backporting to 12.1 branch labels Sep 22, 2026
grokys pushed a commit to Evan260/Avalonia that referenced this pull request Oct 7, 2026
* Make fullscreen reveal bar non-draggable

* Also apply the change to the simple theme

---------

Co-authored-by: Julien Lebosquain 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fullscreen reveal bar is draggable and breaks when moved (WindowDrawnDecorations)

4 participants