1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:17:35 +00:00

Userland: Rename WindowServerConnection=>ConnectionToWindowServer

This was done with CLion's automatic rename feature.
This commit is contained in:
Itamar 2022-02-25 12:39:33 +02:00 committed by Andreas Kling
parent af132fdbd1
commit 935d023967
43 changed files with 201 additions and 201 deletions

View file

@ -6,7 +6,7 @@
#include <LibCore/ArgsParser.h>
#include <LibGUI/Application.h>
#include <LibGUI/WindowServerConnection.h>
#include <LibGUI/ConnectionToWindowServer.h>
#include <LibMain/Main.h>
ErrorOr<int> serenity_main(Main::Arguments arguments)
@ -24,10 +24,10 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.add_positional_argument(scale, "Scale Factor", "scale", Core::ArgsParser::Required::No);
args_parser.parse(arguments);
// A Core::EventLoop is all we need, but WindowServerConnection needs a full Application object.
// A Core::EventLoop is all we need, but ConnectionToWindowServer needs a full Application object.
char* dummy_argv[] = { arguments.argv[0] };
auto app = GUI::Application::construct(1, dummy_argv);
auto screen_layout = GUI::WindowServerConnection::the().get_screen_layout();
auto screen_layout = GUI::ConnectionToWindowServer::the().get_screen_layout();
if (screen < 0 || (size_t)screen >= screen_layout.screens.size()) {
warnln("invalid screen index: {}", screen);
return 1;
@ -36,7 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
main_screen.resolution = { width, height };
if (scale != -1)
main_screen.scale_factor = scale;
auto set_result = GUI::WindowServerConnection::the().set_screen_layout(screen_layout, true);
auto set_result = GUI::ConnectionToWindowServer::the().set_screen_layout(screen_layout, true);
if (!set_result.success()) {
warnln("failed to set resolution: {}", set_result.error_msg());
return 1;

View file

@ -14,10 +14,10 @@
#include <LibCore/File.h>
#include <LibGUI/Application.h>
#include <LibGUI/Clipboard.h>
#include <LibGUI/ConnectionToWindowServer.h>
#include <LibGUI/Painter.h>
#include <LibGUI/Widget.h>
#include <LibGUI/Window.h>
#include <LibGUI/WindowServerConnection.h>
#include <LibGfx/PNGWriter.h>
#include <LibGfx/Palette.h>
#include <LibMain/Main.h>
@ -133,7 +133,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
if (screen >= 0)
screen_index = (u32)screen;
dbgln("getting screenshot...");
auto shared_bitmap = GUI::WindowServerConnection::the().get_screen_bitmap(crop_region, screen_index);
auto shared_bitmap = GUI::ConnectionToWindowServer::the().get_screen_bitmap(crop_region, screen_index);
dbgln("got screenshot");
RefPtr<Gfx::Bitmap> bitmap = shared_bitmap.bitmap();

View file

@ -6,7 +6,7 @@
#include <LibCore/ArgsParser.h>
#include <LibGUI/Application.h>
#include <LibGUI/WindowServerConnection.h>
#include <LibGUI/ConnectionToWindowServer.h>
ErrorOr<int> serenity_main(Main::Arguments arguments)
{
@ -18,6 +18,6 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
args_parser.parse(arguments);
if (flash_flush != -1)
GUI::WindowServerConnection::the().async_set_flash_flush(flash_flush);
GUI::ConnectionToWindowServer::the().async_set_flash_flush(flash_flush);
return 0;
}