mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:17:36 +00:00
WindowServer+LibGUI: Pass the system theme using Core::AnonymousBuffer
This was the last remaining user of shbufs in WindowServer, and so WindowServer no longer pledges "shared_buffer" :^)
This commit is contained in:
parent
9c6c18d9b6
commit
04f95f9160
13 changed files with 51 additions and 56 deletions
|
@ -39,7 +39,7 @@
|
|||
|
||||
int main(int, char**)
|
||||
{
|
||||
if (pledge("stdio video thread sendfd recvfd shared_buffer accept rpath wpath cpath unix proc fattr sigaction", nullptr) < 0) {
|
||||
if (pledge("stdio video thread sendfd recvfd accept rpath wpath cpath unix proc fattr sigaction", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
@ -78,13 +78,13 @@ int main(int, char**)
|
|||
auto theme_name = wm_config->read_entry("Theme", "Name", "Default");
|
||||
|
||||
auto theme = Gfx::load_system_theme(String::formatted("/res/themes/{}.ini", theme_name));
|
||||
ASSERT(theme);
|
||||
Gfx::set_system_theme(*theme);
|
||||
auto palette = Gfx::PaletteImpl::create_with_shared_buffer(*theme);
|
||||
ASSERT(theme.is_valid());
|
||||
Gfx::set_system_theme(theme);
|
||||
auto palette = Gfx::PaletteImpl::create_with_anonymous_buffer(theme);
|
||||
|
||||
WindowServer::EventLoop loop;
|
||||
|
||||
if (pledge("stdio video thread sendfd recvfd shared_buffer accept rpath wpath cpath proc", nullptr) < 0) {
|
||||
if (pledge("stdio video thread sendfd recvfd accept rpath wpath cpath proc", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue