mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 17:45:08 +00:00
WindowServer+LibGUI: Allow changing whether windows have alpha channels.
Use this in Terminal to tell the window server to not bother with the alpha channel in the backing store if we're running without transparency. Semi-transparent terminals look neat but they slow everything down, so this keeps things fast while making it easy to switch to the flashy mode. :^)
This commit is contained in:
parent
2470fdcd9b
commit
6a5d92f0ad
9 changed files with 65 additions and 2 deletions
|
@ -386,8 +386,23 @@ void GWindow::set_automatic_cursor_tracking_widget(GWidget* widget)
|
|||
|
||||
void GWindow::set_has_alpha_channel(bool value)
|
||||
{
|
||||
ASSERT(!m_window_id);
|
||||
if (m_has_alpha_channel == value)
|
||||
return;
|
||||
m_has_alpha_channel = value;
|
||||
if (!m_window_id)
|
||||
return;
|
||||
|
||||
m_pending_paint_event_rects.clear();
|
||||
m_back_bitmap = nullptr;
|
||||
m_front_bitmap = nullptr;
|
||||
|
||||
WSAPI_ClientMessage message;
|
||||
message.type = WSAPI_ClientMessage::Type::SetWindowHasAlphaChannel;
|
||||
message.window_id = m_window_id;
|
||||
message.value = value;
|
||||
GEventLoop::current().sync_request(message, WSAPI_ServerMessage::DidSetWindowHasAlphaChannel);
|
||||
|
||||
update();
|
||||
}
|
||||
|
||||
void GWindow::set_double_buffering_enabled(bool value)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue