mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:17:45 +00:00
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.
This commit is contained in:
parent
5bb79ea0a7
commit
eb21aa65d1
18 changed files with 58 additions and 111 deletions
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue