summaryrefslogtreecommitdiff
path: root/Userland/Services
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Services')
-rw-r--r--Userland/Services/DHCPClient/DHCPv4.cpp2
-rw-r--r--Userland/Services/DHCPClient/DHCPv4Client.cpp2
-rw-r--r--Userland/Services/SystemServer/Service.cpp4
-rw-r--r--Userland/Services/SystemServer/main.cpp2
-rw-r--r--Userland/Services/WebContent/ClientConnection.cpp6
-rw-r--r--Userland/Services/WindowServer/Compositor.cpp18
-rw-r--r--Userland/Services/WindowServer/MenuManager.cpp2
-rw-r--r--Userland/Services/WindowServer/Screen.cpp2
-rw-r--r--Userland/Services/WindowServer/WindowManager.cpp22
9 files changed, 30 insertions, 30 deletions
diff --git a/Userland/Services/DHCPClient/DHCPv4.cpp b/Userland/Services/DHCPClient/DHCPv4.cpp
index b164028df2..b75d08eb67 100644
--- a/Userland/Services/DHCPClient/DHCPv4.cpp
+++ b/Userland/Services/DHCPClient/DHCPv4.cpp
@@ -44,7 +44,7 @@ ParsedDHCPv4Options DHCPv4Packet::parse_options() const
dbgln("Bogus option length {} assuming forgotten END", length);
break;
}
- dbgln<DHCPV4_DEBUG>("DHCP Option {} with length {}", (u8)opt_name, length);
+ dbgln_if(DHCPV4_DEBUG, "DHCP Option {} with length {}", (u8)opt_name, length);
++index;
options.options.set(opt_name, { length, &m_options[index] });
index += length - 1;
diff --git a/Userland/Services/DHCPClient/DHCPv4Client.cpp b/Userland/Services/DHCPClient/DHCPv4Client.cpp
index 6d2a3f3415..ecb76f107d 100644
--- a/Userland/Services/DHCPClient/DHCPv4Client.cpp
+++ b/Userland/Services/DHCPClient/DHCPv4Client.cpp
@@ -207,7 +207,7 @@ void DHCPv4Client::process_incoming(const DHCPv4Packet& packet)
{
auto options = packet.parse_options();
- dbgln<DHCPV4CLIENT_DEBUG>("Here are the options: {}", options.to_string());
+ dbgln_if(DHCPV4CLIENT_DEBUG, "Here are the options: {}", options.to_string());
auto value = options.get<DHCPMessageType>(DHCPOption::DHCPMessageType).value();
switch (value) {
diff --git a/Userland/Services/SystemServer/Service.cpp b/Userland/Services/SystemServer/Service.cpp
index b59629ac71..bd21306404 100644
--- a/Userland/Services/SystemServer/Service.cpp
+++ b/Userland/Services/SystemServer/Service.cpp
@@ -115,7 +115,7 @@ void Service::setup_notifier()
void Service::handle_socket_connection()
{
- dbgln<SERVICE_DEBUG>("Ready to read on behalf of {}", name());
+ dbgln_if(SERVICE_DEBUG, "Ready to read on behalf of {}", name());
if (m_accept_socket_connections) {
int accepted_fd = accept(m_socket_fd, nullptr, nullptr);
@@ -144,7 +144,7 @@ void Service::activate()
void Service::spawn(int socket_fd)
{
- dbgln<SERVICE_DEBUG>("Spawning {}", name());
+ dbgln_if(SERVICE_DEBUG, "Spawning {}", name());
m_run_timer.start();
pid_t pid = fork();
diff --git a/Userland/Services/SystemServer/main.cpp b/Userland/Services/SystemServer/main.cpp
index 535cbacdc4..f20728b506 100644
--- a/Userland/Services/SystemServer/main.cpp
+++ b/Userland/Services/SystemServer/main.cpp
@@ -54,7 +54,7 @@ static void sigchld_handler(int)
if (pid == 0)
break;
- dbgln<SYSTEMSERVER_DEBUG>("Reaped child with pid {}, exit status {}", pid, status);
+ dbgln_if(SYSTEMSERVER_DEBUG, "Reaped child with pid {}, exit status {}", pid, status);
Service* service = Service::find_by_pid(pid);
if (service == nullptr) {
diff --git a/Userland/Services/WebContent/ClientConnection.cpp b/Userland/Services/WebContent/ClientConnection.cpp
index 28957c8194..480f8bffa6 100644
--- a/Userland/Services/WebContent/ClientConnection.cpp
+++ b/Userland/Services/WebContent/ClientConnection.cpp
@@ -87,7 +87,7 @@ void ClientConnection::handle(const Messages::WebContentServer::UpdateSystemThem
void ClientConnection::handle(const Messages::WebContentServer::LoadURL& message)
{
- dbgln<SPAM_DEBUG>("handle: WebContentServer::LoadURL: url={}", message.url());
+ dbgln_if(SPAM_DEBUG, "handle: WebContentServer::LoadURL: url={}", message.url());
String process_name;
if (message.url().host().is_empty())
@@ -102,13 +102,13 @@ void ClientConnection::handle(const Messages::WebContentServer::LoadURL& message
void ClientConnection::handle(const Messages::WebContentServer::LoadHTML& message)
{
- dbgln<SPAM_DEBUG>("handle: WebContentServer::LoadHTML: html={}, url={}", message.html(), message.url());
+ dbgln_if(SPAM_DEBUG, "handle: WebContentServer::LoadHTML: html={}, url={}", message.html(), message.url());
page().load_html(message.html(), message.url());
}
void ClientConnection::handle(const Messages::WebContentServer::SetViewportRect& message)
{
- dbgln<SPAM_DEBUG>("handle: WebContentServer::SetViewportRect: rect={}", message.rect());
+ dbgln_if(SPAM_DEBUG, "handle: WebContentServer::SetViewportRect: rect={}", message.rect());
m_page_host->set_viewport_rect(message.rect());
}
diff --git a/Userland/Services/WindowServer/Compositor.cpp b/Userland/Services/WindowServer/Compositor.cpp
index 160deb554f..9231136442 100644
--- a/Userland/Services/WindowServer/Compositor.cpp
+++ b/Userland/Services/WindowServer/Compositor.cpp
@@ -215,7 +215,7 @@ void Compositor::compose()
};
auto prepare_rect = [&](const Gfx::IntRect& rect) {
- dbgln<COMPOSE_DEBUG>(" -> flush opaque: {}", rect);
+ dbgln_if(COMPOSE_DEBUG, " -> flush opaque: {}", rect);
ASSERT(!flush_rects.intersects(rect));
ASSERT(!flush_transparent_rects.intersects(rect));
flush_rects.add(rect);
@@ -223,7 +223,7 @@ void Compositor::compose()
};
auto prepare_transparency_rect = [&](const Gfx::IntRect& rect) {
- dbgln<COMPOSE_DEBUG>(" -> flush transparent: {}", rect);
+ dbgln_if(COMPOSE_DEBUG, " -> flush transparent: {}", rect);
ASSERT(!flush_rects.intersects(rect));
bool have_rect = false;
for (auto& r : flush_transparent_rects.rects()) {
@@ -270,7 +270,7 @@ void Compositor::compose()
};
m_opaque_wallpaper_rects.for_each_intersected(dirty_screen_rects, [&](const Gfx::IntRect& render_rect) {
- dbgln<COMPOSE_DEBUG>(" render wallpaper opaque: {}", render_rect);
+ dbgln_if(COMPOSE_DEBUG, " render wallpaper opaque: {}", render_rect);
prepare_rect(render_rect);
paint_wallpaper(back_painter, render_rect);
return IterationDecision::Continue;
@@ -282,7 +282,7 @@ void Compositor::compose()
return IterationDecision::Continue;
auto frame_rects = frame_rect.shatter(window.rect());
- dbgln<COMPOSE_DEBUG>(" window {} frame rect: {}", window.title(), frame_rect);
+ dbgln_if(COMPOSE_DEBUG, " window {} frame rect: {}", window.title(), frame_rect);
RefPtr<Gfx::Bitmap> backing_store = window.backing_store();
auto compose_window_rect = [&](Gfx::Painter& painter, const Gfx::IntRect& rect) {
@@ -291,7 +291,7 @@ void Compositor::compose()
// TODO: Should optimize this to use a backing buffer
Gfx::PainterStateSaver saver(painter);
painter.add_clip_rect(intersected_rect);
- dbgln<COMPOSE_DEBUG>(" render frame: {}", intersected_rect);
+ dbgln_if(COMPOSE_DEBUG, " render frame: {}", intersected_rect);
window.frame().paint(painter);
return IterationDecision::Continue;
});
@@ -373,7 +373,7 @@ void Compositor::compose()
auto& opaque_rects = window.opaque_rects();
if (!opaque_rects.is_empty()) {
opaque_rects.for_each_intersected(dirty_rects, [&](const Gfx::IntRect& render_rect) {
- dbgln<COMPOSE_DEBUG>(" render opaque: {}", render_rect);
+ dbgln_if(COMPOSE_DEBUG, " render opaque: {}", render_rect);
prepare_rect(render_rect);
Gfx::PainterStateSaver saver(back_painter);
@@ -388,7 +388,7 @@ void Compositor::compose()
auto& transparency_wallpaper_rects = window.transparency_wallpaper_rects();
if (!transparency_wallpaper_rects.is_empty()) {
transparency_wallpaper_rects.for_each_intersected(dirty_rects, [&](const Gfx::IntRect& render_rect) {
- dbgln<COMPOSE_DEBUG>(" render wallpaper: {}", render_rect);
+ dbgln_if(COMPOSE_DEBUG, " render wallpaper: {}", render_rect);
prepare_transparency_rect(render_rect);
paint_wallpaper(temp_painter, render_rect);
@@ -398,7 +398,7 @@ void Compositor::compose()
auto& transparency_rects = window.transparency_rects();
if (!transparency_rects.is_empty()) {
transparency_rects.for_each_intersected(dirty_rects, [&](const Gfx::IntRect& render_rect) {
- dbgln<COMPOSE_DEBUG>(" render transparent: {}", render_rect);
+ dbgln_if(COMPOSE_DEBUG, " render transparent: {}", render_rect);
prepare_transparency_rect(render_rect);
Gfx::PainterStateSaver saver(temp_painter);
@@ -671,7 +671,7 @@ void Compositor::run_animations(Gfx::DisjointRectSet& flush_rects)
from_rect.height() - (int)(height_delta_per_step * animation_index)
};
- dbgln<MINIMIZE_ANIMATION_DEBUG>("Minimize animation from {} to {} frame# {} {}", from_rect, to_rect, animation_index, rect);
+ dbgln_if(MINIMIZE_ANIMATION_DEBUG, "Minimize animation from {} to {} frame# {} {}", from_rect, to_rect, animation_index, rect);
painter.draw_rect(rect, Color::Transparent); // Color doesn't matter, we draw inverted
flush_rects.add(rect);
diff --git a/Userland/Services/WindowServer/MenuManager.cpp b/Userland/Services/WindowServer/MenuManager.cpp
index fb985c8609..f7521ff060 100644
--- a/Userland/Services/WindowServer/MenuManager.cpp
+++ b/Userland/Services/WindowServer/MenuManager.cpp
@@ -466,7 +466,7 @@ void MenuManager::set_current_menubar(MenuBar* menubar)
else
m_current_menubar = nullptr;
- dbgln<MENUS_DEBUG>("[WM] Current menubar is now {}", menubar);
+ dbgln_if(MENUS_DEBUG, "[WM] Current menubar is now {}", menubar);
Gfx::IntPoint next_menu_location { MenuManager::menubar_menu_margin() / 2, 0 };
for_each_active_menubar_menu([&](Menu& menu) {
diff --git a/Userland/Services/WindowServer/Screen.cpp b/Userland/Services/WindowServer/Screen.cpp
index 1ed3e0bbc7..8fed3a44cc 100644
--- a/Userland/Services/WindowServer/Screen.cpp
+++ b/Userland/Services/WindowServer/Screen.cpp
@@ -82,7 +82,7 @@ bool Screen::set_resolution(int width, int height, int new_scale_factor)
FBResolution physical_resolution { 0, (unsigned)new_physical_width, (unsigned)new_physical_height };
int rc = fb_set_resolution(m_framebuffer_fd, &physical_resolution);
- dbgln<WSSCREEN_DEBUG>("fb_set_resolution() - return code {}", rc);
+ dbgln_if(WSSCREEN_DEBUG, "fb_set_resolution() - return code {}", rc);
if (rc == 0) {
on_change_resolution(physical_resolution.pitch, physical_resolution.width, physical_resolution.height, new_scale_factor);
diff --git a/Userland/Services/WindowServer/WindowManager.cpp b/Userland/Services/WindowServer/WindowManager.cpp
index 257dc65cec..3ce041bc83 100644
--- a/Userland/Services/WindowServer/WindowManager.cpp
+++ b/Userland/Services/WindowServer/WindowManager.cpp
@@ -343,7 +343,7 @@ void WindowManager::notify_title_changed(Window& window)
if (window.type() != WindowType::Normal)
return;
- dbgln<WINDOWMANAGER_DEBUG>("[WM] Window({}) title set to '{}'", &window, window.title());
+ dbgln_if(WINDOWMANAGER_DEBUG, "[WM] Window({}) title set to '{}'", &window, window.title());
if (m_switcher.is_visible())
m_switcher.refresh();
@@ -356,7 +356,7 @@ void WindowManager::notify_modal_unparented(Window& window)
if (window.type() != WindowType::Normal)
return;
- dbgln<WINDOWMANAGER_DEBUG>("[WM] Window({}) was unparented", &window);
+ dbgln_if(WINDOWMANAGER_DEBUG, "[WM] Window({}) was unparented", &window);
if (m_switcher.is_visible())
m_switcher.refresh();
@@ -366,7 +366,7 @@ void WindowManager::notify_modal_unparented(Window& window)
void WindowManager::notify_rect_changed(Window& window, const Gfx::IntRect& old_rect, const Gfx::IntRect& new_rect)
{
- dbgln<RESIZE_DEBUG>("[WM] Window({}) rect changed {} -> {}", &window, old_rect, new_rect);
+ dbgln_if(RESIZE_DEBUG, "[WM] Window({}) rect changed {} -> {}", &window, old_rect, new_rect);
if (m_switcher.is_visible() && window.type() != WindowType::WindowSwitcher)
m_switcher.refresh();
@@ -431,7 +431,7 @@ bool WindowManager::pick_new_active_window(Window* previous_active)
void WindowManager::start_window_move(Window& window, const MouseEvent& event)
{
- dbgln<MOVE_DEBUG>("[WM] Begin moving Window({})", &window);
+ dbgln_if(MOVE_DEBUG, "[WM] Begin moving Window({})", &window);
move_to_front_and_make_active(window);
m_move_window = window;
@@ -464,7 +464,7 @@ void WindowManager::start_window_resize(Window& window, const Gfx::IntPoint& pos
return;
}
- dbgln<RESIZE_DEBUG>("[WM] Begin resizing Window({})", &window);
+ dbgln_if(RESIZE_DEBUG, "[WM] Begin resizing Window({})", &window);
m_resizing_mouse_button = button;
m_resize_window = window;
@@ -491,7 +491,7 @@ bool WindowManager::process_ongoing_window_move(MouseEvent& event, Window*& hove
return false;
if (event.type() == Event::MouseUp && event.button() == MouseButton::Left) {
- dbgln<MOVE_DEBUG>("[WM] Finish moving Window({})", m_move_window);
+ dbgln_if(MOVE_DEBUG, "[WM] Finish moving Window({})", m_move_window);
m_move_window->invalidate();
if (m_move_window->rect().contains(event.position()))
@@ -577,7 +577,7 @@ bool WindowManager::process_ongoing_window_resize(const MouseEvent& event, Windo
return false;
if (event.type() == Event::MouseUp && event.button() == m_resizing_mouse_button) {
- dbgln<RESIZE_DEBUG>("[WM] Finish resizing Window({})", m_resize_window);
+ dbgln_if(RESIZE_DEBUG, "[WM] Finish resizing Window({})", m_resize_window);
Core::EventLoop::current().post_event(*m_resize_window, make<ResizeEvent>(m_resize_window->rect()));
m_resize_window->invalidate();
@@ -684,7 +684,7 @@ bool WindowManager::process_ongoing_window_resize(const MouseEvent& event, Windo
if (m_resize_window->rect() == new_rect)
return true;
- dbgln<RESIZE_DEBUG>("[WM] Resizing, original: {}, now: {}", m_resize_window_original_rect, new_rect);
+ dbgln_if(RESIZE_DEBUG, "[WM] Resizing, original: {}, now: {}", m_resize_window_original_rect, new_rect);
m_resize_window->set_rect(new_rect);
Core::EventLoop::current().post_event(*m_resize_window, make<ResizeEvent>(new_rect));
@@ -806,7 +806,7 @@ void WindowManager::start_menu_doubleclick(Window& window, const MouseEvent& eve
// we either haven't clicked anywhere, or we haven't clicked on this
// window. set the current click window, and reset the timers.
- dbgln<DOUBLECLICK_DEBUG>("Initial mousedown on Window({}) for menus (previous was {})", &window, m_double_click_info.m_clicked_window);
+ dbgln_if(DOUBLECLICK_DEBUG, "Initial mousedown on Window({}) for menus (previous was {})", &window, m_double_click_info.m_clicked_window);
m_double_click_info.m_clicked_window = window;
m_double_click_info.reset();
@@ -838,7 +838,7 @@ void WindowManager::process_event_for_doubleclick(Window& window, MouseEvent& ev
if (&window != m_double_click_info.m_clicked_window) {
// we either haven't clicked anywhere, or we haven't clicked on this
// window. set the current click window, and reset the timers.
- dbgln<DOUBLECLICK_DEBUG>("Initial mouseup on Window({}) for menus (previous was {})", &window, m_double_click_info.m_clicked_window);
+ dbgln_if(DOUBLECLICK_DEBUG, "Initial mouseup on Window({}) for menus (previous was {})", &window, m_double_click_info.m_clicked_window);
m_double_click_info.m_clicked_window = window;
m_double_click_info.reset();
@@ -853,7 +853,7 @@ void WindowManager::process_event_for_doubleclick(Window& window, MouseEvent& ev
// clock
metadata.clock.start();
} else {
- dbgln<DOUBLECLICK_DEBUG>("Transforming MouseUp to MouseDoubleClick ({} < {})!", metadata.clock.elapsed(), m_double_click_speed);
+ dbgln_if(DOUBLECLICK_DEBUG, "Transforming MouseUp to MouseDoubleClick ({} < {})!", metadata.clock.elapsed(), m_double_click_speed);
event = MouseEvent(Event::MouseDoubleClick, event.position(), event.buttons(), event.button(), event.modifiers(), event.wheel_delta());
// invalidate this now we've delivered a doubleclick, otherwise