summaryrefslogtreecommitdiff
path: root/Servers
diff options
context:
space:
mode:
Diffstat (limited to 'Servers')
-rw-r--r--Servers/AudioServer/ASClientConnection.cpp2
-rw-r--r--Servers/AudioServer/ASMixer.h4
-rw-r--r--Servers/ProtocolServer/PSClientConnection.cpp6
-rw-r--r--Servers/ProtocolServer/ProtocolClient.ipc2
-rw-r--r--Servers/ProtocolServer/ProtocolServer.ipc2
-rw-r--r--Servers/WindowServer/ClientConnection.cpp18
-rw-r--r--Servers/WindowServer/WindowManager.cpp8
-rw-r--r--Servers/WindowServer/WindowServer.ipc6
8 files changed, 24 insertions, 24 deletions
diff --git a/Servers/AudioServer/ASClientConnection.cpp b/Servers/AudioServer/ASClientConnection.cpp
index 365236f934..a1d4b766a0 100644
--- a/Servers/AudioServer/ASClientConnection.cpp
+++ b/Servers/AudioServer/ASClientConnection.cpp
@@ -92,7 +92,7 @@ OwnPtr<Messages::AudioServer::SetMainMixVolumeResponse> ASClientConnection::hand
OwnPtr<Messages::AudioServer::EnqueueBufferResponse> ASClientConnection::handle(const Messages::AudioServer::EnqueueBuffer& message)
{
- auto shared_buffer = SharedBuffer::create_from_shared_buffer_id(message.buffer_id());
+ auto shared_buffer = SharedBuffer::create_from_shbuf_id(message.buffer_id());
if (!shared_buffer) {
// FIXME: The shared buffer should have been retrieved for us already.
// We don't want to do IPC error checking at this layer.
diff --git a/Servers/AudioServer/ASMixer.h b/Servers/AudioServer/ASMixer.h
index 6e4d500f99..e5ed5874b2 100644
--- a/Servers/AudioServer/ASMixer.h
+++ b/Servers/AudioServer/ASMixer.h
@@ -64,7 +64,7 @@ public:
++m_played_samples;
if (m_position >= m_current->sample_count()) {
- m_client->did_finish_playing_buffer({}, m_current->shared_buffer_id());
+ m_client->did_finish_playing_buffer({}, m_current->shbuf_id());
m_current = nullptr;
m_position = 0;
}
@@ -93,7 +93,7 @@ public:
int get_playing_buffer() const
{
if (m_current)
- return m_current->shared_buffer_id();
+ return m_current->shbuf_id();
return -1;
}
diff --git a/Servers/ProtocolServer/PSClientConnection.cpp b/Servers/ProtocolServer/PSClientConnection.cpp
index 4253367d44..e788e190f3 100644
--- a/Servers/ProtocolServer/PSClientConnection.cpp
+++ b/Servers/ProtocolServer/PSClientConnection.cpp
@@ -82,9 +82,9 @@ void PSClientConnection::did_finish_download(Badge<Download>, Download& download
memcpy(buffer->data(), download.payload().data(), download.payload().size());
buffer->seal();
buffer->share_with(client_pid());
- m_shared_buffers.set(buffer->shared_buffer_id(), buffer);
+ m_shared_buffers.set(buffer->shbuf_id(), buffer);
}
- post_message(Messages::ProtocolClient::DownloadFinished(download.id(), success, download.total_size(), buffer ? buffer->shared_buffer_id() : -1));
+ post_message(Messages::ProtocolClient::DownloadFinished(download.id(), success, download.total_size(), buffer ? buffer->shbuf_id() : -1));
}
void PSClientConnection::did_progress_download(Badge<Download>, Download& download)
@@ -99,6 +99,6 @@ OwnPtr<Messages::ProtocolServer::GreetResponse> PSClientConnection::handle(const
OwnPtr<Messages::ProtocolServer::DisownSharedBufferResponse> PSClientConnection::handle(const Messages::ProtocolServer::DisownSharedBuffer& message)
{
- m_shared_buffers.remove(message.shared_buffer_id());
+ m_shared_buffers.remove(message.shbuf_id());
return make<Messages::ProtocolServer::DisownSharedBufferResponse>();
}
diff --git a/Servers/ProtocolServer/ProtocolClient.ipc b/Servers/ProtocolServer/ProtocolClient.ipc
index 58a408add9..03e023f7a7 100644
--- a/Servers/ProtocolServer/ProtocolClient.ipc
+++ b/Servers/ProtocolServer/ProtocolClient.ipc
@@ -2,5 +2,5 @@ endpoint ProtocolClient = 13
{
// Download notifications
DownloadProgress(i32 download_id, u32 total_size, u32 downloaded_size) =|
- DownloadFinished(i32 download_id, bool success, u32 total_size, i32 shared_buffer_id) =|
+ DownloadFinished(i32 download_id, bool success, u32 total_size, i32 shbuf_id) =|
}
diff --git a/Servers/ProtocolServer/ProtocolServer.ipc b/Servers/ProtocolServer/ProtocolServer.ipc
index 698273c3aa..74ec138ab5 100644
--- a/Servers/ProtocolServer/ProtocolServer.ipc
+++ b/Servers/ProtocolServer/ProtocolServer.ipc
@@ -4,7 +4,7 @@ endpoint ProtocolServer = 9
Greet() => (i32 client_id)
// FIXME: It would be nice if the kernel provided a way to avoid this
- DisownSharedBuffer(i32 shared_buffer_id) => ()
+ DisownSharedBuffer(i32 shbuf_id) => ()
// Test if a specific protocol is supported, e.g "http"
IsSupportedProtocol(String protocol) => (bool supported)
diff --git a/Servers/WindowServer/ClientConnection.cpp b/Servers/WindowServer/ClientConnection.cpp
index 7f558a0766..74d1f234cd 100644
--- a/Servers/WindowServer/ClientConnection.cpp
+++ b/Servers/WindowServer/ClientConnection.cpp
@@ -193,7 +193,7 @@ OwnPtr<Messages::WindowServer::AddMenuItemResponse> ClientConnection::handle(con
auto& menu = *(*it).value;
auto menu_item = make<MenuItem>(menu, identifier, message.text(), message.shortcut(), message.enabled(), message.checkable(), message.checked());
if (message.icon_buffer_id() != -1) {
- auto icon_buffer = SharedBuffer::create_from_shared_buffer_id(message.icon_buffer_id());
+ auto icon_buffer = SharedBuffer::create_from_shbuf_id(message.icon_buffer_id());
if (!icon_buffer)
return nullptr;
// FIXME: Verify that the icon buffer can accomodate a 16x16 bitmap view.
@@ -349,7 +349,7 @@ OwnPtr<Messages::WindowServer::SetWindowIconBitmapResponse> ClientConnection::ha
}
auto& window = *(*it).value;
- auto icon_buffer = SharedBuffer::create_from_shared_buffer_id(message.icon_buffer_id());
+ auto icon_buffer = SharedBuffer::create_from_shbuf_id(message.icon_buffer_id());
if (!icon_buffer) {
window.set_default_icon();
@@ -393,7 +393,7 @@ OwnPtr<Messages::WindowServer::GetWindowRectResponse> ClientConnection::handle(c
OwnPtr<Messages::WindowServer::SetClipboardContentsResponse> ClientConnection::handle(const Messages::WindowServer::SetClipboardContents& message)
{
- auto shared_buffer = SharedBuffer::create_from_shared_buffer_id(message.shared_buffer_id());
+ auto shared_buffer = SharedBuffer::create_from_shbuf_id(message.shbuf_id());
if (!shared_buffer) {
did_misbehave("SetClipboardContents: Bad shared buffer ID");
return nullptr;
@@ -406,7 +406,7 @@ OwnPtr<Messages::WindowServer::GetClipboardContentsResponse> ClientConnection::h
{
auto& clipboard = Clipboard::the();
- i32 shared_buffer_id = -1;
+ i32 shbuf_id = -1;
if (clipboard.size()) {
// FIXME: Optimize case where an app is copy/pasting within itself.
// We can just reuse the SharedBuffer then, since it will have the same peer PID.
@@ -416,13 +416,13 @@ OwnPtr<Messages::WindowServer::GetClipboardContentsResponse> ClientConnection::h
memcpy(shared_buffer->data(), clipboard.data(), clipboard.size());
shared_buffer->seal();
shared_buffer->share_with(client_pid());
- shared_buffer_id = shared_buffer->shared_buffer_id();
+ shbuf_id = shared_buffer->shbuf_id();
// FIXME: This is a workaround for the fact that SharedBuffers will go away if neither side is retaining them.
// After we respond to GetClipboardContents, we have to wait for the client to ref the buffer on his side.
m_last_sent_clipboard_content = move(shared_buffer);
}
- return make<Messages::WindowServer::GetClipboardContentsResponse>(shared_buffer_id, clipboard.size(), clipboard.data_type());
+ return make<Messages::WindowServer::GetClipboardContentsResponse>(shbuf_id, clipboard.size(), clipboard.data_type());
}
OwnPtr<Messages::WindowServer::CreateWindowResponse> ClientConnection::handle(const Messages::WindowServer::CreateWindow& message)
@@ -509,10 +509,10 @@ OwnPtr<Messages::WindowServer::SetWindowBackingStoreResponse> ClientConnection::
return nullptr;
}
auto& window = *(*it).value;
- if (window.last_backing_store() && window.last_backing_store()->shared_buffer_id() == message.shared_buffer_id()) {
+ if (window.last_backing_store() && window.last_backing_store()->shbuf_id() == message.shbuf_id()) {
window.swap_backing_stores();
} else {
- auto shared_buffer = SharedBuffer::create_from_shared_buffer_id(message.shared_buffer_id());
+ auto shared_buffer = SharedBuffer::create_from_shbuf_id(message.shbuf_id());
if (!shared_buffer)
return make<Messages::WindowServer::SetWindowBackingStoreResponse>();
auto backing_store = Gfx::Bitmap::create_with_shared_buffer(
@@ -669,7 +669,7 @@ OwnPtr<Messages::WindowServer::StartDragResponse> ClientConnection::handle(const
RefPtr<Gfx::Bitmap> bitmap;
if (message.bitmap_id() != -1) {
- auto shared_buffer = SharedBuffer::create_from_shared_buffer_id(message.bitmap_id());
+ auto shared_buffer = SharedBuffer::create_from_shbuf_id(message.bitmap_id());
ssize_t size_in_bytes = message.bitmap_size().area() * sizeof(Gfx::RGBA32);
if (size_in_bytes > shared_buffer->size()) {
did_misbehave("SetAppletBackingStore: Shared buffer is too small for applet size");
diff --git a/Servers/WindowServer/WindowManager.cpp b/Servers/WindowServer/WindowManager.cpp
index 3f4c4f3822..4ec32a488b 100644
--- a/Servers/WindowServer/WindowManager.cpp
+++ b/Servers/WindowServer/WindowManager.cpp
@@ -252,13 +252,13 @@ void WindowManager::tell_wm_listener_about_window_icon(Window& listener, Window&
return;
if (window.is_internal())
return;
- if (window.icon().shared_buffer_id() == -1)
+ if (window.icon().shbuf_id() == -1)
return;
- dbg() << "WindowServer: Sharing icon buffer " << window.icon().shared_buffer_id() << " with PID " << listener.client()->client_pid();
- if (share_buffer_with(window.icon().shared_buffer_id(), listener.client()->client_pid()) < 0) {
+ dbg() << "WindowServer: Sharing icon buffer " << window.icon().shbuf_id() << " with PID " << listener.client()->client_pid();
+ if (shbuf_allow_pid(window.icon().shbuf_id(), listener.client()->client_pid()) < 0) {
ASSERT_NOT_REACHED();
}
- listener.client()->post_message(Messages::WindowClient::WM_WindowIconBitmapChanged(listener.window_id(), window.client_id(), window.window_id(), window.icon().shared_buffer_id(), window.icon().size()));
+ listener.client()->post_message(Messages::WindowClient::WM_WindowIconBitmapChanged(listener.window_id(), window.client_id(), window.window_id(), window.icon().shbuf_id(), window.icon().size()));
}
void WindowManager::tell_wm_listeners_window_state_changed(Window& window)
diff --git a/Servers/WindowServer/WindowServer.ipc b/Servers/WindowServer/WindowServer.ipc
index 92fafc6c71..ee805da3a7 100644
--- a/Servers/WindowServer/WindowServer.ipc
+++ b/Servers/WindowServer/WindowServer.ipc
@@ -57,9 +57,9 @@ endpoint WindowServer = 2
SetGlobalCursorTracking(i32 window_id, bool enabled) => ()
SetWindowOpacity(i32 window_id, float opacity) => ()
- SetWindowBackingStore(i32 window_id, i32 bpp, i32 pitch, i32 shared_buffer_id, bool has_alpha_channel, Gfx::Size size, bool flush_immediately) => ()
- GetClipboardContents() => (i32 shared_buffer_id, i32 content_size, String content_type)
- SetClipboardContents(i32 shared_buffer_id, i32 content_size, String content_type) => ()
+ SetWindowBackingStore(i32 window_id, i32 bpp, i32 pitch, i32 shbuf_id, bool has_alpha_channel, Gfx::Size size, bool flush_immediately) => ()
+ GetClipboardContents() => (i32 shbuf_id, i32 content_size, String content_type)
+ SetClipboardContents(i32 shbuf_id, i32 content_size, String content_type) => ()
WM_SetActiveWindow(i32 client_id, i32 window_id) =|
WM_SetWindowMinimized(i32 client_id, i32 window_id, bool minimized) =|