summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-07-04 22:26:24 +0200
committerAndreas Kling <kling@serenityos.org>2021-07-04 23:15:16 +0200
commit782a5c88ce895da644444c98be88e03e84526bbf (patch)
tree758b92bb3f10d4c04d8ee2049855db0c03e9577a
parent70c6090fef96cb7d2d65fe8b1139a1ce4768c000 (diff)
downloadserenity-782a5c88ce895da644444c98be88e03e84526bbf.zip
WindowServer: Make most remaining WindowServer IPC calls async
The only remaining sync call from client to server is now the call that switches a window's backing store. That one actually relies on the synchronization to hand over ownership of the backing stores, so it has to stay synchronous for now.
-rw-r--r--Userland/Applications/Magnifier/MagnifierWidget.cpp2
-rw-r--r--Userland/Applications/MouseSettings/MouseSettingsWindow.cpp6
-rw-r--r--Userland/Demos/CatDog/CatDog.cpp2
-rw-r--r--Userland/Demos/Eyes/EyesWidget.cpp2
-rw-r--r--Userland/Libraries/LibGUI/Window.cpp4
-rw-r--r--Userland/Services/WindowServer/WindowServer.ipc12
6 files changed, 14 insertions, 14 deletions
diff --git a/Userland/Applications/Magnifier/MagnifierWidget.cpp b/Userland/Applications/Magnifier/MagnifierWidget.cpp
index aa0ce2df88..8c17a917e3 100644
--- a/Userland/Applications/Magnifier/MagnifierWidget.cpp
+++ b/Userland/Applications/Magnifier/MagnifierWidget.cpp
@@ -27,7 +27,7 @@ void MagnifierWidget::track_cursor_globally()
VERIFY(window_id >= 0);
set_global_cursor_tracking(true);
- GUI::WindowServerConnection::the().set_global_cursor_tracking(window_id, true);
+ GUI::WindowServerConnection::the().async_set_global_cursor_tracking(window_id, true);
}
void MagnifierWidget::set_scale_factor(int scale_factor)
diff --git a/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp b/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp
index 25fc6bf2db..3c6f923fa1 100644
--- a/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp
+++ b/Userland/Applications/MouseSettings/MouseSettingsWindow.cpp
@@ -24,9 +24,9 @@ constexpr int double_click_speed_default = 250;
void MouseSettingsWindow::update_window_server()
{
const float factor = m_speed_slider->value() / speed_slider_scale;
- GUI::WindowServerConnection::the().set_mouse_acceleration(factor);
- GUI::WindowServerConnection::the().set_scroll_step_size(m_scroll_length_spinbox->value());
- GUI::WindowServerConnection::the().set_double_click_speed(m_double_click_speed_slider->value());
+ GUI::WindowServerConnection::the().async_set_mouse_acceleration(factor);
+ GUI::WindowServerConnection::the().async_set_scroll_step_size(m_scroll_length_spinbox->value());
+ GUI::WindowServerConnection::the().async_set_double_click_speed(m_double_click_speed_slider->value());
}
void MouseSettingsWindow::reset_default_values()
diff --git a/Userland/Demos/CatDog/CatDog.cpp b/Userland/Demos/CatDog/CatDog.cpp
index ffbd17dc00..bccfaab3a2 100644
--- a/Userland/Demos/CatDog/CatDog.cpp
+++ b/Userland/Demos/CatDog/CatDog.cpp
@@ -135,7 +135,7 @@ void CatDog::track_cursor_globally()
VERIFY(window_id >= 0);
set_global_cursor_tracking(true);
- GUI::WindowServerConnection::the().set_global_cursor_tracking(window_id, true);
+ GUI::WindowServerConnection::the().async_set_global_cursor_tracking(window_id, true);
}
void CatDog::context_menu_event(GUI::ContextMenuEvent& event)
diff --git a/Userland/Demos/Eyes/EyesWidget.cpp b/Userland/Demos/Eyes/EyesWidget.cpp
index f1565771ff..2fe07ba04d 100644
--- a/Userland/Demos/Eyes/EyesWidget.cpp
+++ b/Userland/Demos/Eyes/EyesWidget.cpp
@@ -22,7 +22,7 @@ void EyesWidget::track_cursor_globally()
VERIFY(window_id >= 0);
set_global_cursor_tracking(true);
- GUI::WindowServerConnection::the().set_global_cursor_tracking(window_id, true);
+ GUI::WindowServerConnection::the().async_set_global_cursor_tracking(window_id, true);
}
void EyesWidget::mousemove_event(GUI::MouseEvent& event)
diff --git a/Userland/Libraries/LibGUI/Window.cpp b/Userland/Libraries/LibGUI/Window.cpp
index 057e7586a6..6d88a8aa30 100644
--- a/Userland/Libraries/LibGUI/Window.cpp
+++ b/Userland/Libraries/LibGUI/Window.cpp
@@ -911,7 +911,7 @@ void Window::set_fullscreen(bool fullscreen)
m_fullscreen = fullscreen;
if (!is_visible())
return;
- WindowServerConnection::the().set_fullscreen(m_window_id, fullscreen);
+ WindowServerConnection::the().async_set_fullscreen(m_window_id, fullscreen);
}
void Window::set_frameless(bool frameless)
@@ -921,7 +921,7 @@ void Window::set_frameless(bool frameless)
m_frameless = frameless;
if (!is_visible())
return;
- WindowServerConnection::the().set_frameless(m_window_id, frameless);
+ WindowServerConnection::the().async_set_frameless(m_window_id, frameless);
if (!frameless)
apply_icon();
diff --git a/Userland/Services/WindowServer/WindowServer.ipc b/Userland/Services/WindowServer/WindowServer.ipc
index 0653607472..ddad53ceca 100644
--- a/Userland/Services/WindowServer/WindowServer.ipc
+++ b/Userland/Services/WindowServer/WindowServer.ipc
@@ -78,7 +78,7 @@ endpoint WindowServer
invalidate_rect(i32 window_id, Vector<Gfx::IntRect> rects, bool ignore_occlusion) =|
did_finish_painting(i32 window_id, Vector<Gfx::IntRect> rects) =|
- set_global_cursor_tracking(i32 window_id, bool enabled) => ()
+ set_global_cursor_tracking(i32 window_id, bool enabled) =|
set_window_opacity(i32 window_id, float opacity) =|
set_window_alpha_hit_threshold(i32 window_id, float threshold) =|
@@ -87,8 +87,8 @@ endpoint WindowServer
set_window_has_alpha_channel(i32 window_id, bool has_alpha_channel) =|
move_window_to_front(i32 window_id) =|
- set_fullscreen(i32 window_id, bool fullscreen) => ()
- set_frameless(i32 window_id, bool frameless) => ()
+ set_fullscreen(i32 window_id, bool fullscreen) =|
+ set_frameless(i32 window_id, bool frameless) =|
popup_menu(i32 menu_id, Gfx::IntPoint screen_position) =|
dismiss_menu(i32 menu_id) =|
@@ -127,10 +127,10 @@ endpoint WindowServer
get_global_cursor_position() => (Gfx::IntPoint position)
- set_mouse_acceleration(float factor) => ()
+ set_mouse_acceleration(float factor) =|
get_mouse_acceleration() => (float factor)
- set_scroll_step_size(u32 step_size) => ()
+ set_scroll_step_size(u32 step_size) =|
get_scroll_step_size() => (u32 step_size)
get_screen_bitmap(Optional<Gfx::IntRect> rect, Optional<u32> screen_index) => (Gfx::ShareableBitmap bitmap)
@@ -138,7 +138,7 @@ endpoint WindowServer
pong() =|
- set_double_click_speed(int speed) => ()
+ set_double_click_speed(int speed) =|
get_double_click_speed() => (int speed)
get_desktop_display_scale(u32 screen_index) => (int desktop_display_scale)