mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
WindowServer: Allow windows to be pinnable (always on top)
This patch adds the concept of a window being "Pinnable" (always drawn on top of other windows). This can be toggled through a new checkable action in the top left corner's window menu.
This commit is contained in:
parent
d5722eab36
commit
f6f14777ac
7 changed files with 87 additions and 0 deletions
|
@ -2005,6 +2005,14 @@ void WindowManager::maximize_windows(Window& window, bool maximized)
|
|||
});
|
||||
}
|
||||
|
||||
void WindowManager::set_pinned(Window& window, bool pinned)
|
||||
{
|
||||
for_each_window_in_modal_stack(window, [&](auto& w, bool) {
|
||||
w.set_pinned(pinned);
|
||||
return IterationDecision::Continue;
|
||||
});
|
||||
}
|
||||
|
||||
Gfx::IntPoint WindowManager::get_recommended_window_position(Gfx::IntPoint const& desired)
|
||||
{
|
||||
// FIXME: Find a better source for the width and height to shift by.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue