mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
WindowServer: Allow server-internal windows with alpha channel
We were not creating backing stores with alpha for server-internal windows. There was no reason for this limitation.
This commit is contained in:
parent
583fbf7111
commit
9f7f7e69bb
Notes:
sideshowbarker
2024-07-18 01:10:17 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/9f7f7e69bb7
1 changed files with 2 additions and 1 deletions
|
@ -147,7 +147,8 @@ void Window::set_rect(const Gfx::IntRect& rect)
|
|||
if (rect.is_empty()) {
|
||||
m_backing_store = nullptr;
|
||||
} else if (!m_client && (!m_backing_store || old_rect.size() != rect.size())) {
|
||||
m_backing_store = Gfx::Bitmap::try_create(Gfx::BitmapFormat::BGRx8888, m_rect.size()).release_value_but_fixme_should_propagate_errors();
|
||||
auto format = has_alpha_channel() ? Gfx::BitmapFormat::BGRA8888 : Gfx::BitmapFormat::BGRx8888;
|
||||
m_backing_store = Gfx::Bitmap::try_create(format, m_rect.size()).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
invalidate(true, old_rect.size() != rect.size());
|
||||
|
|
Loading…
Reference in a new issue