summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorGunnar Beutner <gbeutner@serenityos.org>2021-05-03 13:55:29 +0200
committerAndreas Kling <kling@serenityos.org>2021-05-03 21:14:40 +0200
commiteb21aa65d131f6fb382ad80d672e5a7ffb1a21e1 (patch)
tree674d52f397d8318941e97426b5100c18c8ac885f /Userland
parent5bb79ea0a79322d944368825ec617ccfb8912b81 (diff)
downloadserenity-eb21aa65d131f6fb382ad80d672e5a7ffb1a21e1.zip
Userland: Make IPC results with one return value available directly
This changes client methods so that they return the IPC response's return value directly - instead of the response struct - for IPC methods which only have a single return value.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/MouseSettings/MouseSettingsWindow.cpp6
-rw-r--r--Userland/Applications/SpaceAnalyzer/TreeMapWidget.cpp2
-rw-r--r--Userland/DevTools/IPCCompiler/main.cpp24
-rw-r--r--Userland/Libraries/LibAudio/ClientConnection.cpp52
-rw-r--r--Userland/Libraries/LibAudio/ClientConnection.h13
-rw-r--r--Userland/Libraries/LibDesktop/Launcher.cpp6
-rw-r--r--Userland/Libraries/LibGUI/Application.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Desktop.cpp2
-rw-r--r--Userland/Libraries/LibGUI/DragOperation.cpp4
-rw-r--r--Userland/Libraries/LibGUI/Menu.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Menubar.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Window.cpp21
-rw-r--r--Userland/Libraries/LibProtocol/RequestClient.cpp9
-rw-r--r--Userland/Libraries/LibProtocol/RequestClient.h1
-rw-r--r--Userland/Libraries/LibProtocol/WebSocketClient.cpp7
-rw-r--r--Userland/Services/Taskbar/main.cpp6
-rw-r--r--Userland/Services/WebContent/PageHost.cpp6
-rw-r--r--Userland/Utilities/shot.cpp4
18 files changed, 58 insertions, 111 deletions
diff --git a/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp b/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp
index 7910b6f80c..25fc6bf2db 100644
--- a/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp
+++ b/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp
@@ -48,12 +48,12 @@ MouseSettingsWindow::MouseSettingsWindow()
m_speed_slider->on_change = [&](const int value) {
m_speed_label->set_text(String::formatted("{} %", value));
};
- const int slider_value = float { speed_slider_scale } * GUI::WindowServerConnection::the().get_mouse_acceleration().factor();
+ const int slider_value = float { speed_slider_scale } * GUI::WindowServerConnection::the().get_mouse_acceleration();
m_speed_slider->set_value(slider_value);
m_scroll_length_spinbox = *main_widget.find_descendant_of_type_named<GUI::SpinBox>("scroll_length_spinbox");
m_scroll_length_spinbox->set_min(WindowServer::scroll_step_size_min);
- m_scroll_length_spinbox->set_value(GUI::WindowServerConnection::the().get_scroll_step_size().step_size());
+ m_scroll_length_spinbox->set_value(GUI::WindowServerConnection::the().get_scroll_step_size());
m_double_click_speed_label = *main_widget.find_descendant_of_type_named<GUI::Label>("double_click_speed_label");
m_double_click_speed_slider = *main_widget.find_descendant_of_type_named<GUI::HorizontalSlider>("double_click_speed_slider");
@@ -62,7 +62,7 @@ MouseSettingsWindow::MouseSettingsWindow()
m_double_click_speed_slider->on_change = [&](const int value) {
m_double_click_speed_label->set_text(String::formatted("{} ms", value));
};
- m_double_click_speed_slider->set_value(GUI::WindowServerConnection::the().get_double_click_speed().speed());
+ m_double_click_speed_slider->set_value(GUI::WindowServerConnection::the().get_double_click_speed());
m_ok_button = *main_widget.find_descendant_of_type_named<GUI::Button>("ok_button");
m_ok_button->on_click = [this](auto) {
diff --git a/Userland/Applications/SpaceAnalyzer/TreeMapWidget.cpp b/Userland/Applications/SpaceAnalyzer/TreeMapWidget.cpp
index f9cb3bea81..2bc94a01e0 100644
--- a/Userland/Applications/SpaceAnalyzer/TreeMapWidget.cpp
+++ b/Userland/Applications/SpaceAnalyzer/TreeMapWidget.cpp
@@ -316,7 +316,7 @@ void TreeMapWidget::mousewheel_event(GUI::MouseEvent& event)
{
int delta = event.wheel_delta();
// FIXME: The wheel_delta is premultiplied in the window server, we actually want a raw value here.
- int step_size = GUI::WindowServerConnection::the().get_scroll_step_size().step_size();
+ int step_size = GUI::WindowServerConnection::the().get_scroll_step_size();
if (delta > 0) {
size_t step_back = delta / step_size;
if (step_back > m_viewpoint)
diff --git a/Userland/DevTools/IPCCompiler/main.cpp b/Userland/DevTools/IPCCompiler/main.cpp
index 4a6ad43d1f..a57dcab053 100644
--- a/Userland/DevTools/IPCCompiler/main.cpp
+++ b/Userland/DevTools/IPCCompiler/main.cpp
@@ -491,8 +491,12 @@ public:
auto do_implement_proxy = [&](String const& name, Vector<Parameter> const& parameters, bool is_synchronous) {
String return_type = "void";
- if (is_synchronous && !message.outputs.is_empty())
- return_type = message_name(endpoint.name, message.name, true);
+ if (is_synchronous) {
+ if (message.outputs.size() == 1)
+ return_type = message.outputs[0].type;
+ else if (!message.outputs.is_empty())
+ return_type = message_name(endpoint.name, message.name, true);
+ }
message_generator.set("message.name", message.name);
message_generator.set("message.complex_return_type", return_type);
message_generator.set("async_prefix_maybe", is_synchronous ? "" : "async_");
@@ -516,8 +520,10 @@ public:
if (is_synchronous) {
if (return_type != "void") {
message_generator.append(R"~~~(
- return move(*)~~~");
- } else{
+ return )~~~");
+ if (message.outputs.size() != 1)
+ message_generator.append(" move(*");
+ } else {
message_generator.append(R"~~~(
)~~~");
}
@@ -545,9 +551,17 @@ public:
message_generator.append(")");
}
- message_generator.append(R"~~~();
+ if (message.outputs.size() == 1) {
+ message_generator.append("->");
+ message_generator.append(message.outputs[0].name);
+ message_generator.append("()");
+ } else
+ message_generator.append(")");
+
+ message_generator.append(R"~~~(;
}
)~~~");
+
} else {
message_generator.append(R"~~~( });
}
diff --git a/Userland/Libraries/LibAudio/ClientConnection.cpp b/Userland/Libraries/LibAudio/ClientConnection.cpp
index f095b2a968..4f47bd41d5 100644
--- a/Userland/Libraries/LibAudio/ClientConnection.cpp
+++ b/Userland/Libraries/LibAudio/ClientConnection.cpp
@@ -22,8 +22,8 @@ void ClientConnection::handshake()
void ClientConnection::enqueue(const Buffer& buffer)
{
for (;;) {
- auto response = enqueue_buffer(buffer.anonymous_buffer(), buffer.id(), buffer.sample_count());
- if (response.success())
+ auto success = enqueue_buffer(buffer.anonymous_buffer(), buffer.id(), buffer.sample_count());
+ if (success)
break;
sleep(1);
}
@@ -31,53 +31,7 @@ void ClientConnection::enqueue(const Buffer& buffer)
bool ClientConnection::try_enqueue(const Buffer& buffer)
{
- auto response = enqueue_buffer(buffer.anonymous_buffer(), buffer.id(), buffer.sample_count());
- return response.success();
-}
-
-bool ClientConnection::get_muted()
-{
- return IPCProxy::get_muted().muted();
-}
-
-void ClientConnection::set_muted(bool muted)
-{
- IPCProxy::set_muted(muted);
-}
-
-int ClientConnection::get_main_mix_volume()
-{
- return IPCProxy::get_main_mix_volume().volume();
-}
-
-void ClientConnection::set_main_mix_volume(int volume)
-{
- IPCProxy::set_main_mix_volume(volume);
-}
-
-int ClientConnection::get_remaining_samples()
-{
- return IPCProxy::get_remaining_samples().remaining_samples();
-}
-
-int ClientConnection::get_played_samples()
-{
- return IPCProxy::get_played_samples().played_samples();
-}
-
-void ClientConnection::set_paused(bool paused)
-{
- IPCProxy::set_paused(paused);
-}
-
-void ClientConnection::clear_buffer(bool paused)
-{
- IPCProxy::clear_buffer(paused);
-}
-
-int ClientConnection::get_playing_buffer()
-{
- return IPCProxy::get_playing_buffer().buffer_id();
+ return enqueue_buffer(buffer.anonymous_buffer(), buffer.id(), buffer.sample_count());
}
void ClientConnection::finished_playing_buffer(i32 buffer_id)
diff --git a/Userland/Libraries/LibAudio/ClientConnection.h b/Userland/Libraries/LibAudio/ClientConnection.h
index 3ef2cc3dcd..2d5b326d8a 100644
--- a/Userland/Libraries/LibAudio/ClientConnection.h
+++ b/Userland/Libraries/LibAudio/ClientConnection.h
@@ -24,19 +24,6 @@ public:
void enqueue(const Buffer&);
bool try_enqueue(const Buffer&);
- bool get_muted();
- void set_muted(bool);
-
- int get_main_mix_volume();
- void set_main_mix_volume(int);
-
- int get_remaining_samples();
- int get_played_samples();
- int get_playing_buffer();
-
- void set_paused(bool paused);
- void clear_buffer(bool paused = false);
-
Function<void(i32 buffer_id)> on_finish_playing_buffer;
Function<void(bool muted)> on_muted_state_change;
Function<void(int volume)> on_main_mix_volume_change;
diff --git a/Userland/Libraries/LibDesktop/Launcher.cpp b/Userland/Libraries/LibDesktop/Launcher.cpp
index c77d4a8fba..4ae1307c8d 100644
--- a/Userland/Libraries/LibDesktop/Launcher.cpp
+++ b/Userland/Libraries/LibDesktop/Launcher.cpp
@@ -99,7 +99,7 @@ bool Launcher::seal_allowlist()
bool Launcher::open(const URL& url, const String& handler_name)
{
- return connection().open_url(url, handler_name).response();
+ return connection().open_url(url, handler_name);
}
bool Launcher::open(const URL& url, const Details& details)
@@ -110,12 +110,12 @@ bool Launcher::open(const URL& url, const Details& details)
Vector<String> Launcher::get_handlers_for_url(const URL& url)
{
- return connection().get_handlers_for_url(url.to_string()).handlers();
+ return connection().get_handlers_for_url(url.to_string());
}
auto Launcher::get_handlers_with_details_for_url(const URL& url) -> NonnullRefPtrVector<Details>
{
- auto details = connection().get_handlers_with_details_for_url(url.to_string()).handlers_details();
+ auto details = connection().get_handlers_with_details_for_url(url.to_string());
NonnullRefPtrVector<Details> handlers_with_details;
for (auto& value : details) {
handlers_with_details.append(Details::from_details_str(value));
diff --git a/Userland/Libraries/LibGUI/Application.cpp b/Userland/Libraries/LibGUI/Application.cpp
index cafd194c41..6d3aca6564 100644
--- a/Userland/Libraries/LibGUI/Application.cpp
+++ b/Userland/Libraries/LibGUI/Application.cpp
@@ -186,7 +186,7 @@ void Application::tooltip_show_timer_did_fire()
Gfx::IntRect desktop_rect = Desktop::the().rect();
const int margin = 30;
- Gfx::IntPoint adjusted_pos = WindowServerConnection::the().get_global_cursor_position().position();
+ Gfx::IntPoint adjusted_pos = WindowServerConnection::the().get_global_cursor_position();
adjusted_pos.translate_by(0, 18);
diff --git a/Userland/Libraries/LibGUI/Desktop.cpp b/Userland/Libraries/LibGUI/Desktop.cpp
index 8dda3d099f..9c0e05296a 100644
--- a/Userland/Libraries/LibGUI/Desktop.cpp
+++ b/Userland/Libraries/LibGUI/Desktop.cpp
@@ -59,7 +59,7 @@ bool Desktop::set_wallpaper(const StringView& path, bool save_config)
String Desktop::wallpaper() const
{
- return WindowServerConnection::the().get_wallpaper().path();
+ return WindowServerConnection::the().get_wallpaper();
}
}
diff --git a/Userland/Libraries/LibGUI/DragOperation.cpp b/Userland/Libraries/LibGUI/DragOperation.cpp
index f840569cc3..d0aa5c76d6 100644
--- a/Userland/Libraries/LibGUI/DragOperation.cpp
+++ b/Userland/Libraries/LibGUI/DragOperation.cpp
@@ -37,12 +37,12 @@ DragOperation::Outcome DragOperation::exec()
drag_bitmap = bitmap->to_shareable_bitmap();
}
- auto response = WindowServerConnection::the().start_drag(
+ auto started = WindowServerConnection::the().start_drag(
m_mime_data->text(),
m_mime_data->all_data(),
drag_bitmap);
- if (!response.started()) {
+ if (!started) {
m_outcome = Outcome::Cancelled;
return m_outcome;
}
diff --git a/Userland/Libraries/LibGUI/Menu.cpp b/Userland/Libraries/LibGUI/Menu.cpp
index 9cdc02623f..46f060ac8f 100644
--- a/Userland/Libraries/LibGUI/Menu.cpp
+++ b/Userland/Libraries/LibGUI/Menu.cpp
@@ -85,7 +85,7 @@ void Menu::dismiss()
int Menu::realize_menu(RefPtr<Action> default_action)
{
unrealize_menu();
- m_menu_id = WindowServerConnection::the().create_menu(m_name).menu_id();
+ m_menu_id = WindowServerConnection::the().create_menu(m_name);
dbgln_if(MENU_DEBUG, "GUI::Menu::realize_menu(): New menu ID: {}", m_menu_id);
VERIFY(m_menu_id > 0);
diff --git a/Userland/Libraries/LibGUI/Menubar.cpp b/Userland/Libraries/LibGUI/Menubar.cpp
index 2afac80b91..4caa05ae96 100644
--- a/Userland/Libraries/LibGUI/Menubar.cpp
+++ b/Userland/Libraries/LibGUI/Menubar.cpp
@@ -30,7 +30,7 @@ Menu& Menubar::add_menu(String name)
int Menubar::realize_menubar()
{
- return WindowServerConnection::the().create_menubar().menubar_id();
+ return WindowServerConnection::the().create_menubar();
}
void Menubar::unrealize_menubar()
diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp
index 1f028b2369..16dfe13a49 100644
--- a/Userland/Libraries/LibGUI/Window.cpp
+++ b/Userland/Libraries/LibGUI/Window.cpp
@@ -119,7 +119,7 @@ void Window::show()
auto* parent_window = find_parent_window();
- auto response = WindowServerConnection::the().create_window(
+ m_window_id = WindowServerConnection::the().create_window(
m_rect_when_windowless,
!m_moved_by_client,
m_has_alpha_channel,
@@ -138,7 +138,6 @@ void Window::show()
(i32)m_window_type,
m_title_when_windowless,
parent_window ? parent_window->window_id() : 0);
- m_window_id = response.window_id();
m_visible = true;
apply_icon();
@@ -178,10 +177,10 @@ void Window::hide()
{
if (!is_visible())
return;
- auto response = WindowServerConnection::the().destroy_window(m_window_id);
+ auto destroyed_window_ids = WindowServerConnection::the().destroy_window(m_window_id);
server_did_destroy();
- for (auto child_window_id : response.destroyed_window_ids()) {
+ for (auto child_window_id : destroyed_window_ids) {
if (auto* window = Window::from_window_id(child_window_id)) {
window->server_did_destroy();
}
@@ -212,20 +211,20 @@ String Window::title() const
{
if (!is_visible())
return m_title_when_windowless;
- return WindowServerConnection::the().get_window_title(m_window_id).title();
+ return WindowServerConnection::the().get_window_title(m_window_id);
}
Gfx::IntRect Window::applet_rect_on_screen() const
{
VERIFY(m_window_type == WindowType::Applet);
- return WindowServerConnection::the().get_applet_rect_on_screen(m_window_id).rect();
+ return WindowServerConnection::the().get_applet_rect_on_screen(m_window_id);
}
Gfx::IntRect Window::rect() const
{
if (!is_visible())
return m_rect_when_windowless;
- return WindowServerConnection::the().get_window_rect(m_window_id).rect();
+ return WindowServerConnection::the().get_window_rect(m_window_id);
}
void Window::set_rect(const Gfx::IntRect& a_rect)
@@ -240,7 +239,7 @@ void Window::set_rect(const Gfx::IntRect& a_rect)
m_main_widget->resize(m_rect_when_windowless.size());
return;
}
- auto window_rect = WindowServerConnection::the().set_window_rect(m_window_id, a_rect).rect();
+ auto window_rect = WindowServerConnection::the().set_window_rect(m_window_id, a_rect);
if (m_back_store && m_back_store->size() != window_rect.size())
m_back_store = nullptr;
if (m_front_store && m_front_store->size() != window_rect.size())
@@ -254,7 +253,7 @@ Gfx::IntSize Window::minimum_size() const
if (!is_visible())
return m_minimum_size_when_windowless;
- return WindowServerConnection::the().get_window_minimum_size(m_window_id).size();
+ return WindowServerConnection::the().get_window_minimum_size(m_window_id);
}
void Window::set_minimum_size(const Gfx::IntSize& size)
@@ -904,7 +903,7 @@ bool Window::is_maximized() const
if (!is_visible())
return false;
- return WindowServerConnection::the().is_maximized(m_window_id).maximized();
+ return WindowServerConnection::the().is_maximized(m_window_id);
}
void Window::schedule_relayout()
@@ -1084,7 +1083,7 @@ bool Window::is_modified() const
{
if (!m_window_id)
return false;
- return WindowServerConnection::the().is_window_modified(m_window_id).modified();
+ return WindowServerConnection::the().is_window_modified(m_window_id);
}
void Window::set_modified(bool modified)
diff --git a/Userland/Libraries/LibProtocol/RequestClient.cpp b/Userland/Libraries/LibProtocol/RequestClient.cpp
index 8c25c1ea27..cbf3d6cc36 100644
--- a/Userland/Libraries/LibProtocol/RequestClient.cpp
+++ b/Userland/Libraries/LibProtocol/RequestClient.cpp
@@ -21,11 +21,6 @@ void RequestClient::handshake()
greet();
}
-bool RequestClient::is_supported_protocol(const String& protocol)
-{
- return IPCProxy::is_supported_protocol(protocol).supported();
-}
-
template<typename RequestHashMapTraits>
RefPtr<Request> RequestClient::start_request(const String& method, const String& url, const HashMap<String, String, RequestHashMapTraits>& request_headers, ReadonlyBytes request_body)
{
@@ -49,14 +44,14 @@ bool RequestClient::stop_request(Badge<Request>, Request& request)
{
if (!m_requests.contains(request.id()))
return false;
- return IPCProxy::stop_request(request.id()).success();
+ return IPCProxy::stop_request(request.id());
}
bool RequestClient::set_certificate(Badge<Request>, Request& request, String certificate, String key)
{
if (!m_requests.contains(request.id()))
return false;
- return IPCProxy::set_certificate(request.id(), move(certificate), move(key)).success();
+ return IPCProxy::set_certificate(request.id(), move(certificate), move(key));
}
void RequestClient::request_finished(i32 request_id, bool success, u32 total_size)
diff --git a/Userland/Libraries/LibProtocol/RequestClient.h b/Userland/Libraries/LibProtocol/RequestClient.h
index 1dfe45bf7f..a07a5d0f6b 100644
--- a/Userland/Libraries/LibProtocol/RequestClient.h
+++ b/Userland/Libraries/LibProtocol/RequestClient.h
@@ -23,7 +23,6 @@ class RequestClient
public:
virtual void handshake() override;
- bool is_supported_protocol(const String&);
template<typename RequestHashMapTraits = Traits<String>>
RefPtr<Request> start_request(const String& method, const String& url, const HashMap<String, String, RequestHashMapTraits>& request_headers = {}, ReadonlyBytes request_body = {});
diff --git a/Userland/Libraries/LibProtocol/WebSocketClient.cpp b/Userland/Libraries/LibProtocol/WebSocketClient.cpp
index e8607d7e2b..4b07f2198d 100644
--- a/Userland/Libraries/LibProtocol/WebSocketClient.cpp
+++ b/Userland/Libraries/LibProtocol/WebSocketClient.cpp
@@ -25,8 +25,7 @@ RefPtr<WebSocket> WebSocketClient::connect(const URL& url, const String& origin,
IPC::Dictionary header_dictionary;
for (auto& it : request_headers)
header_dictionary.add(it.key, it.value);
- auto response = IPCProxy::connect(url, origin, protocols, extensions, header_dictionary);
- auto connection_id = response.connection_id();
+ auto connection_id = IPCProxy::connect(url, origin, protocols, extensions, header_dictionary);
if (connection_id < 0)
return nullptr;
auto connection = WebSocket::create_from_id({}, *this, connection_id);
@@ -38,7 +37,7 @@ u32 WebSocketClient::ready_state(Badge<WebSocket>, WebSocket& connection)
{
if (!m_connections.contains(connection.id()))
return (u32)WebSocket::ReadyState::Closed;
- return IPCProxy::ready_state(connection.id()).ready_state();
+ return IPCProxy::ready_state(connection.id());
}
void WebSocketClient::send(Badge<WebSocket>, WebSocket& connection, ByteBuffer data, bool is_text)
@@ -59,7 +58,7 @@ bool WebSocketClient::set_certificate(Badge<WebSocket>, WebSocket& connection, S
{
if (!m_connections.contains(connection.id()))
return false;
- return IPCProxy::set_certificate(connection.id(), move(certificate), move(key)).success();
+ return IPCProxy::set_certificate(connection.id(), move(certificate), move(key));
}
void WebSocketClient::connected(i32 connection_id)
diff --git a/Userland/Services/Taskbar/main.cpp b/Userland/Services/Taskbar/main.cpp
index e32e208049..9d2041ef3e 100644
--- a/Userland/Services/Taskbar/main.cpp
+++ b/Userland/Services/Taskbar/main.cpp
@@ -178,7 +178,7 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
quick_sort(g_themes, [](auto& a, auto& b) { return a.name < b.name; });
}
- auto current_theme_name = GUI::WindowServerConnection::the().get_system_theme().theme_name();
+ auto current_theme_name = GUI::WindowServerConnection::the().get_system_theme();
{
int theme_identifier = 0;
@@ -186,8 +186,8 @@ NonnullRefPtr<GUI::Menu> build_system_menu()
auto action = GUI::Action::create_checkable(theme.name, [theme_identifier](auto&) {
auto& theme = g_themes[theme_identifier];
dbgln("Theme switched to {} at path {}", theme.name, theme.path);
- auto response = GUI::WindowServerConnection::the().set_system_theme(theme.path, theme.name);
- VERIFY(response.success());
+ auto success = GUI::WindowServerConnection::the().set_system_theme(theme.path, theme.name);
+ VERIFY(success);
});
if (theme.name == current_theme_name)
action->set_checked(true);
diff --git a/Userland/Services/WebContent/PageHost.cpp b/Userland/Services/WebContent/PageHost.cpp
index 6e2647287d..71df79afe7 100644
--- a/Userland/Services/WebContent/PageHost.cpp
+++ b/Userland/Services/WebContent/PageHost.cpp
@@ -171,12 +171,12 @@ void PageHost::page_did_request_alert(const String& message)
bool PageHost::page_did_request_confirm(const String& message)
{
- return m_client.did_request_confirm(message).result();
+ return m_client.did_request_confirm(message);
}
String PageHost::page_did_request_prompt(const String& message, const String& default_)
{
- return m_client.did_request_prompt(message, default_).response();
+ return m_client.did_request_prompt(message, default_);
}
void PageHost::page_did_change_favicon(const Gfx::Bitmap& favicon)
@@ -191,7 +191,7 @@ void PageHost::page_did_request_image_context_menu(const Gfx::IntPoint& content_
String PageHost::page_did_request_cookie(const URL& url, Web::Cookie::Source source)
{
- return m_client.did_request_cookie(url, static_cast<u8>(source)).cookie();
+ return m_client.did_request_cookie(url, static_cast<u8>(source));
}
void PageHost::page_did_set_cookie(const URL& url, const Web::Cookie::ParsedCookie& cookie, Web::Cookie::Source source)
diff --git a/Userland/Utilities/shot.cpp b/Userland/Utilities/shot.cpp
index 82f4f0d071..7b75712c31 100644
--- a/Userland/Utilities/shot.cpp
+++ b/Userland/Utilities/shot.cpp
@@ -34,9 +34,9 @@ int main(int argc, char** argv)
auto app = GUI::Application::construct(argc, argv);
sleep(delay);
- auto response = GUI::WindowServerConnection::the().get_screen_bitmap();
+ auto shared_bitmap = GUI::WindowServerConnection::the().get_screen_bitmap();
- auto* bitmap = response.bitmap().bitmap();
+ auto* bitmap = shared_bitmap.bitmap();
if (!bitmap) {
warnln("Failed to grab screenshot");
return 1;