mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +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
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…
Add table
Add a link
Reference in a new issue