mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 13:57:35 +00:00
Kernel+LibC+WindowServer: Remove unused thread/process boost mechanism
The priority boosting mechanism has been broken for a very long time. Let's remove it from the codebase and we can bring it back the day someone feels like implementing it in a working way. :^)
This commit is contained in:
parent
43109f9614
commit
01c2480eb3
9 changed files with 1 additions and 96 deletions
|
@ -770,24 +770,6 @@ OwnPtr<Messages::WindowServer::GetSystemThemeResponse> ClientConnection::handle(
|
|||
return make<Messages::WindowServer::GetSystemThemeResponse>(name);
|
||||
}
|
||||
|
||||
void ClientConnection::boost()
|
||||
{
|
||||
// FIXME: Re-enable this when we have a solution for boosting.
|
||||
#if 0
|
||||
if (set_process_boost(client_pid(), 10) < 0)
|
||||
perror("boost: set_process_boost");
|
||||
#endif
|
||||
}
|
||||
|
||||
void ClientConnection::deboost()
|
||||
{
|
||||
// FIXME: Re-enable this when we have a solution for boosting.
|
||||
#if 0
|
||||
if (set_process_boost(client_pid(), 0) < 0)
|
||||
perror("deboost: set_process_boost");
|
||||
#endif
|
||||
}
|
||||
|
||||
OwnPtr<Messages::WindowServer::SetWindowBaseSizeAndSizeIncrementResponse> ClientConnection::handle(const Messages::WindowServer::SetWindowBaseSizeAndSizeIncrement& message)
|
||||
{
|
||||
auto it = m_windows.find(message.window_id());
|
||||
|
|
|
@ -54,9 +54,6 @@ public:
|
|||
|
||||
bool is_unresponsive() const { return m_unresponsive; }
|
||||
|
||||
void boost();
|
||||
void deboost();
|
||||
|
||||
static ClientConnection* from_client_id(int client_id);
|
||||
static void for_each_client(Function<void(ClientConnection&)>);
|
||||
|
||||
|
|
|
@ -1239,11 +1239,7 @@ void WindowManager::set_active_window(Window* window, bool make_input)
|
|||
|
||||
auto* previously_active_window = m_active_window.ptr();
|
||||
|
||||
ClientConnection* previously_active_client = nullptr;
|
||||
ClientConnection* active_client = nullptr;
|
||||
|
||||
if (previously_active_window) {
|
||||
previously_active_client = previously_active_window->client();
|
||||
Core::EventLoop::current().post_event(*previously_active_window, make<Event>(Event::WindowDeactivated));
|
||||
previously_active_window->invalidate();
|
||||
m_active_window = nullptr;
|
||||
|
@ -1253,7 +1249,6 @@ void WindowManager::set_active_window(Window* window, bool make_input)
|
|||
|
||||
if (window) {
|
||||
m_active_window = *window;
|
||||
active_client = m_active_window->client();
|
||||
Core::EventLoop::current().post_event(*m_active_window, make<Event>(Event::WindowActivated));
|
||||
m_active_window->invalidate();
|
||||
if (auto* client = window->client()) {
|
||||
|
@ -1265,13 +1260,6 @@ void WindowManager::set_active_window(Window* window, bool make_input)
|
|||
} else {
|
||||
MenuManager::the().set_current_menubar(nullptr);
|
||||
}
|
||||
|
||||
if (active_client != previously_active_client) {
|
||||
if (previously_active_client)
|
||||
previously_active_client->deboost();
|
||||
if (active_client)
|
||||
active_client->boost();
|
||||
}
|
||||
}
|
||||
|
||||
void WindowManager::set_hovered_window(Window* window)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue