mirror of
https://github.com/SerenityOS/serenity
synced 2024-09-06 17:06:31 +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
|
@ -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