diff options
Diffstat (limited to 'src/platform')
| -rw-r--r-- | src/platform/graphics/cairo/CairoPainter.cpp | 2 | ||||
| -rw-r--r-- | src/platform/graphics/direct2d/Painter.cpp | 4 | ||||
| -rw-r--r-- | src/platform/gui/osx/Clipboard.mm | 2 | ||||
| -rw-r--r-- | src/platform/gui/sdl/OpenGLRenderer.cpp | 14 | ||||
| -rw-r--r-- | src/platform/gui/win/Clipboard.cpp | 16 | ||||
| -rw-r--r-- | src/platform/gui/win/Cursor.cpp | 4 | ||||
| -rw-r--r-- | src/platform/gui/win/InputMethod.cpp | 27 | ||||
| -rw-r--r-- | src/platform/gui/win/Window.cpp | 39 | ||||
| -rw-r--r-- | src/platform/gui/xcb/InputMethod.cpp | 30 | ||||
| -rw-r--r-- | src/platform/gui/xcb/Window.cpp | 8 |
10 files changed, 75 insertions, 71 deletions
diff --git a/src/platform/graphics/cairo/CairoPainter.cpp b/src/platform/graphics/cairo/CairoPainter.cpp index 97ef7fe0..30162506 100644 --- a/src/platform/graphics/cairo/CairoPainter.cpp +++ b/src/platform/graphics/cairo/CairoPainter.cpp @@ -236,7 +236,7 @@ void CairoPainter::PopState() { void CairoPainter::EndDraw() { if (cairo_surface_ != nullptr) { - CRU_LOG_TAG_DEBUG("Flush cairo painter."); + CruLogDebug(kLogTag, "Flush cairo painter."); cairo_surface_flush(cairo_surface_); cairo_device_t* device = cairo_surface_get_device(cairo_surface_); if (device) { diff --git a/src/platform/graphics/direct2d/Painter.cpp b/src/platform/graphics/direct2d/Painter.cpp index 79401f6e..76eed621 100644 --- a/src/platform/graphics/direct2d/Painter.cpp +++ b/src/platform/graphics/direct2d/Painter.cpp @@ -19,8 +19,8 @@ D2DDeviceContextPainter::D2DDeviceContextPainter( D2DDeviceContextPainter::~D2DDeviceContextPainter() { if (is_drawing_) { - CRU_LOG_TAG_INFO( - "You may forget to call EndDraw before destroying painter."); + CruLogInfo(kLogTag, + "You may forget to call EndDraw before destroying painter."); } if (release_) { diff --git a/src/platform/gui/osx/Clipboard.mm b/src/platform/gui/osx/Clipboard.mm index 61652589..b14c78ab 100644 --- a/src/platform/gui/osx/Clipboard.mm +++ b/src/platform/gui/osx/Clipboard.mm @@ -25,7 +25,7 @@ OsxClipboardPrivate::~OsxClipboardPrivate() {} std::string OsxClipboardPrivate::GetText() { auto result = [pasteboard_ readObjectsForClasses:@[ NSString.class ] options:nil]; if (result == nil) { - CRU_LOG_TAG_WARN("Failed to get text from clipboard"); + CruLogWarn(kLogTag, "Failed to get text from clipboard"); return ""; } else { if (result.count == 0) { diff --git a/src/platform/gui/sdl/OpenGLRenderer.cpp b/src/platform/gui/sdl/OpenGLRenderer.cpp index 7e8fdf33..07b58147 100644 --- a/src/platform/gui/sdl/OpenGLRenderer.cpp +++ b/src/platform/gui/sdl/OpenGLRenderer.cpp @@ -60,8 +60,9 @@ SdlOpenGLRenderer::SdlOpenGLRenderer(SdlWindow* window, int width, int height) { auto _ = MakeContextCurrent(); auto version = gladLoadGLContext(&glad_gl_context_, SDL_GL_GetProcAddress); - CRU_LOG_TAG_DEBUG("SDL window id {}, openGL version: {}.{}.", sdl_window_id_, - GLAD_VERSION_MAJOR(version), GLAD_VERSION_MINOR(version)); + CruLogDebug(kLogTag, "SDL window id {}, openGL version: {}.{}.", + sdl_window_id_, GLAD_VERSION_MAJOR(version), + GLAD_VERSION_MINOR(version)); glad_gl_context_.Enable(GL_BLEND); glad_gl_context_.BlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); @@ -114,7 +115,7 @@ SdlOpenGLRenderer::~SdlOpenGLRenderer() { } void SdlOpenGLRenderer::Resize(int width, int height) { - CRU_LOG_TAG_DEBUG("Resize to {} x {}", width, height); + CruLogDebug(kLogTag, "Resize to {} x {}", width, height); width_ = width; height_ = height; @@ -198,8 +199,8 @@ GLuint SdlOpenGLRenderer::CreateGLProgram() { glad_gl_context_.GetShaderiv(shader, GL_COMPILE_STATUS, &success); if (!success) { glad_gl_context_.GetShaderInfoLog(shader, 512, nullptr, infoLog); - CRU_LOG_TAG_ERROR("Failed to compile OpenGL {} shader: {}", name, - infoLog); + CruLogError(kLogTag, "Failed to compile OpenGL {} shader: {}", name, + infoLog); } }; @@ -209,7 +210,8 @@ GLuint SdlOpenGLRenderer::CreateGLProgram() { glad_gl_context_.GetProgramiv(program, GL_COMPILE_STATUS, &success); if (!success) { glad_gl_context_.GetProgramInfoLog(program, 512, nullptr, infoLog); - CRU_LOG_TAG_ERROR("Failed to link OpenGL {} program: {}", name, infoLog); + CruLogError(kLogTag, "Failed to link OpenGL {} program: {}", name, + infoLog); } }; diff --git a/src/platform/gui/win/Clipboard.cpp b/src/platform/gui/win/Clipboard.cpp index 2a41a1eb..a269822d 100644 --- a/src/platform/gui/win/Clipboard.cpp +++ b/src/platform/gui/win/Clipboard.cpp @@ -11,25 +11,25 @@ WinClipboard::~WinClipboard() {} std::string WinClipboard::GetText() { if (!::OpenClipboard(nullptr)) { - CRU_LOG_TAG_WARN("Failed to open clipboard."); + CruLogWarn(kLogTag, "Failed to open clipboard."); return {}; } if (!::IsClipboardFormatAvailable(CF_UNICODETEXT)) { - CRU_LOG_TAG_WARN("Clipboard format for text is not available."); + CruLogWarn(kLogTag, "Clipboard format for text is not available."); return {}; } auto handle = ::GetClipboardData(CF_UNICODETEXT); if (handle == nullptr) { - CRU_LOG_TAG_WARN("Failed to get clipboard data."); + CruLogWarn(kLogTag, "Failed to get clipboard data."); return {}; } auto ptr = ::GlobalLock(handle); if (ptr == nullptr) { - CRU_LOG_TAG_WARN("Failed to lock clipboard data."); + CruLogWarn(kLogTag, "Failed to lock clipboard data."); ::CloseClipboard(); return {}; } @@ -46,21 +46,21 @@ void WinClipboard::SetText(std::string utf8_text) { auto text = string::ToUtf16WString(utf8_text); if (!::OpenClipboard(nullptr)) { - CRU_LOG_TAG_WARN("Failed to open clipboard."); + CruLogWarn(kLogTag, "Failed to open clipboard."); return; } auto handle = GlobalAlloc(GMEM_MOVEABLE, (text.size() + 1) * sizeof(wchar_t)); if (handle == nullptr) { - CRU_LOG_TAG_WARN("Failed to allocate clipboard data."); + CruLogWarn(kLogTag, "Failed to allocate clipboard data."); ::CloseClipboard(); return; } auto ptr = ::GlobalLock(handle); if (ptr == nullptr) { - CRU_LOG_TAG_WARN("Failed to lock clipboard data."); + CruLogWarn(kLogTag, "Failed to lock clipboard data."); ::GlobalFree(handle); ::CloseClipboard(); return; @@ -71,7 +71,7 @@ void WinClipboard::SetText(std::string utf8_text) { ::GlobalUnlock(handle); if (::SetClipboardData(CF_UNICODETEXT, handle) == nullptr) { - CRU_LOG_TAG_WARN("Failed to set clipboard data."); + CruLogWarn(kLogTag, "Failed to set clipboard data."); } ::CloseClipboard(); diff --git a/src/platform/gui/win/Cursor.cpp b/src/platform/gui/win/Cursor.cpp index 0ed40416..b789c47b 100644 --- a/src/platform/gui/win/Cursor.cpp +++ b/src/platform/gui/win/Cursor.cpp @@ -14,8 +14,8 @@ WinCursor::~WinCursor() { if (!::DestroyCursor(handle_)) { // This is not a fetal error but might still need notice because it may // cause leak. - CRU_LOG_TAG_WARN("Failed to destroy a cursor. Last error code: {}", - ::GetLastError()); + CruLogWarn(kLogTag, "Failed to destroy a cursor. Last error code: {}", + ::GetLastError()); } } } diff --git a/src/platform/gui/win/InputMethod.cpp b/src/platform/gui/win/InputMethod.cpp index 3439df32..12f30297 100644 --- a/src/platform/gui/win/InputMethod.cpp +++ b/src/platform/gui/win/InputMethod.cpp @@ -30,7 +30,7 @@ AutoHIMC& AutoHIMC::operator=(AutoHIMC&& other) { AutoHIMC::~AutoHIMC() { if (handle_) { if (!::ImmReleaseContext(hwnd_, handle_)) - CRU_LOG_TAG_WARN("Failed to release HIMC."); + CruLogWarn(kLogTag, "Failed to release HIMC."); } } @@ -161,7 +161,7 @@ WinInputMethodContext::~WinInputMethodContext() {} void WinInputMethodContext::EnableIME() { const auto hwnd = native_window_->GetWindowHandle(); if (::ImmAssociateContextEx(hwnd, nullptr, IACE_DEFAULT) == FALSE) { - CRU_LOG_TAG_WARN("Failed to enable ime."); + CruLogWarn(kLogTag, "Failed to enable ime."); } } @@ -172,21 +172,21 @@ void WinInputMethodContext::DisableIME() { ::ImmNotifyIME(himc.Get(), NI_COMPOSITIONSTR, CPS_COMPLETE, 0); if (::ImmAssociateContextEx(hwnd, nullptr, 0) == FALSE) { - CRU_LOG_TAG_WARN("Failed to disable ime."); + CruLogWarn(kLogTag, "Failed to disable ime."); } } void WinInputMethodContext::CompleteComposition() { auto himc = GetHIMC(); if (!::ImmNotifyIME(himc.Get(), NI_COMPOSITIONSTR, CPS_COMPLETE, 0)) { - CRU_LOG_TAG_WARN("Failed to complete composition."); + CruLogWarn(kLogTag, "Failed to complete composition."); } } void WinInputMethodContext::CancelComposition() { auto himc = GetHIMC(); if (!::ImmNotifyIME(himc.Get(), NI_COMPOSITIONSTR, CPS_CANCEL, 0)) { - CRU_LOG_TAG_WARN("Failed to complete composition."); + CruLogWarn(kLogTag, "Failed to complete composition."); } } @@ -205,7 +205,8 @@ void WinInputMethodContext::SetCandidateWindowPosition(const Point& point) { form.ptCurrentPos = native_window_->DipToPixel(point); if (!::ImmSetCandidateWindow(himc.Get(), &form)) - CRU_LOG_TAG_DEBUG("Failed to set input method candidate window position."); + CruLogDebug(kLogTag, + "Failed to set input method candidate window position."); } IEvent<std::nullptr_t>* WinInputMethodContext::CompositionStartEvent() { @@ -234,9 +235,9 @@ void WinInputMethodContext::OnWindowNativeMessage( // I don't think this will happen because normal key strike without ime // should only trigger ascci character. If it is a charater from // supplementary planes, it should be handled with ime messages. - CRU_LOG_TAG_WARN( - "A WM_CHAR message for character from supplementary " - "planes is ignored."); + CruLogWarn(kLogTag, + "A WM_CHAR message for character from supplementary " + "planes is ignored."); } else { if (c != '\b') { // ignore backspace if (c == '\r') c = '\n'; // Change \r to \n @@ -249,8 +250,8 @@ void WinInputMethodContext::OnWindowNativeMessage( case WM_IME_COMPOSITION: { composition_event_.Raise(nullptr); auto composition_text = GetCompositionText(); - CRU_LOG_TAG_DEBUG("WM_IME_COMPOSITION composition text: {}", - composition_text.text); + CruLogDebug(kLogTag, "WM_IME_COMPOSITION composition text: {}", + composition_text.text); if (message.l_param & GCS_RESULTSTR) { auto result_string = GetResultString(); text_event_.Raise(result_string); @@ -258,12 +259,12 @@ void WinInputMethodContext::OnWindowNativeMessage( break; } case WM_IME_STARTCOMPOSITION: { - CRU_LOG_TAG_DEBUG("WM_IME_STARTCOMPOSITION received."); + CruLogDebug(kLogTag, "WM_IME_STARTCOMPOSITION received."); composition_start_event_.Raise(nullptr); break; } case WM_IME_ENDCOMPOSITION: { - CRU_LOG_TAG_DEBUG("WM_IME_ENDCOMPOSITION received."); + CruLogDebug(kLogTag, "WM_IME_ENDCOMPOSITION received."); composition_end_event_.Raise(nullptr); break; } diff --git a/src/platform/gui/win/Window.cpp b/src/platform/gui/win/Window.cpp index fb2ce024..f1138a78 100644 --- a/src/platform/gui/win/Window.cpp +++ b/src/platform/gui/win/Window.cpp @@ -136,8 +136,8 @@ void WinNativeWindow::SetVisibility(WindowVisibilityType visibility) { Size WinNativeWindow::GetClientSize() { return GetClientRect().GetSize(); } void WinNativeWindow::SetClientSize(const Size& size) { - CRU_LOG_TAG_DEBUG("{} set client size to {}.", - static_cast<void*>(GetWindowHandle()), size); + CruLogDebug(kLogTag, "{} set client size to {}.", + static_cast<void*>(GetWindowHandle()), size); client_rect_.SetSize(size); @@ -154,8 +154,8 @@ void WinNativeWindow::SetClientSize(const Size& size) { Rect WinNativeWindow::GetClientRect() { return client_rect_; } void WinNativeWindow::SetClientRect(const Rect& rect) { - CRU_LOG_TAG_DEBUG("{} set client rect to {}.", - static_cast<void*>(GetWindowHandle()), rect); + CruLogDebug(kLogTag, "{} set client rect to {}.", + static_cast<void*>(GetWindowHandle()), rect); client_rect_ = rect; @@ -183,8 +183,8 @@ Rect WinNativeWindow::GetWindowRect() { } void WinNativeWindow::SetWindowRect(const Rect& rect) { - CRU_LOG_TAG_DEBUG("{} set window rect to {}.", - static_cast<void*>(GetWindowHandle()), rect); + CruLogDebug(kLogTag, "{} set window rect to {}.", + static_cast<void*>(GetWindowHandle()), rect); client_rect_ = CalcClientRectFromWindow(rect, style_flag_, dpi_); @@ -223,7 +223,7 @@ bool WinNativeWindow::ReleaseMouse() { } void WinNativeWindow::RequestRepaint() { - CRU_LOG_TAG_DEBUG("A repaint is requested."); + CruLogDebug(kLogTag, "A repaint is requested."); if (!hwnd_) return; if (!::InvalidateRect(hwnd_, nullptr, FALSE)) throw Win32Error(::GetLastError(), "Failed to invalidate window."); @@ -250,17 +250,18 @@ void WinNativeWindow::SetCursor(std::shared_ptr<ICursor> cursor) { if (!::SetClassLongPtrW(hwnd_, GCLP_HCURSOR, reinterpret_cast<LONG_PTR>(cursor_->GetHandle()))) { - CRU_LOG_TAG_WARN( - "Failed to set cursor because failed to set class long. Last " - "error code: {}.", - ::GetLastError()); + CruLogWarn(kLogTag, + "Failed to set cursor because failed to set class long. Last " + "error code: {}.", + ::GetLastError()); return; } if (GetVisibility() != WindowVisibilityType::Show) return; auto lg = [](std::string_view reason) { - CRU_LOG_TAG_WARN( + CruLogWarn( + kLogTag, "Failed to set cursor because {} when window is visible. (We need to " "update cursor if it is inside the window.) Last error code: {}.", reason, ::GetLastError()); @@ -488,8 +489,8 @@ void WinNativeWindow::RecreateWindow() { if (dpi == 0) throw Win32Error(::GetLastError(), "Failed to get dpi of window."); dpi_ = static_cast<float>(dpi); - CRU_LOG_TAG_DEBUG("Dpi of window {} is {}.", - static_cast<void*>(GetWindowHandle()), dpi_); + CruLogDebug(kLogTag, "Dpi of window {} is {}.", + static_cast<void*>(GetWindowHandle()), dpi_); application_->RegisterWindow(this); @@ -508,14 +509,14 @@ void WinNativeWindow::RecreateWindow() { } void WinNativeWindow::OnCreateInternal() { - CRU_LOG_TAG_DEBUG("A native window is created, hwnd {}.", - static_cast<void*>(GetWindowHandle())); + CruLogDebug(kLogTag, "A native window is created, hwnd {}.", + static_cast<void*>(GetWindowHandle())); CreateEvent_.Raise(nullptr); } void WinNativeWindow::OnDestroyInternal() { - CRU_LOG_TAG_DEBUG("A native window is destroying, hwnd {}.", - static_cast<void*>(GetWindowHandle())); + CruLogDebug(kLogTag, "A native window is destroying, hwnd {}.", + static_cast<void*>(GetWindowHandle())); DestroyEvent_.Raise(nullptr); hwnd_ = nullptr; @@ -537,7 +538,7 @@ void WinNativeWindow::OnPaintInternal() { } Paint1Event_.Raise(args); ::ValidateRect(hwnd_, nullptr); - CRU_LOG_TAG_DEBUG("A repaint is finished."); + CruLogDebug(kLogTag, "A repaint is finished."); } void WinNativeWindow::OnMoveInternal(const int new_left, const int new_top) { diff --git a/src/platform/gui/xcb/InputMethod.cpp b/src/platform/gui/xcb/InputMethod.cpp index 96d04348..2a370eca 100644 --- a/src/platform/gui/xcb/InputMethod.cpp +++ b/src/platform/gui/xcb/InputMethod.cpp @@ -20,9 +20,9 @@ XcbXimInputMethodManager::XcbXimInputMethodManager( xcb_xim_im_callback kXimCallbacks = { .forward_event = - [](xcb_xim_t *im, xcb_xic_t ic, xcb_key_press_event_t *event, - void *user_data) { - CRU_LOG_TAG_DEBUG("Key event forwarded back from XIM."); + [](xcb_xim_t* im, xcb_xic_t ic, xcb_key_press_event_t* event, + void* user_data) { + CruLogDebug(kLogTag, "Key event forwarded back from XIM."); auto manager = static_cast<XcbXimInputMethodManager *>(user_data); if ((event->response_type & ~0x80) == XCB_KEY_PRESS) { auto text = @@ -45,9 +45,9 @@ XcbXimInputMethodManager::XcbXimInputMethodManager( } }, .commit_string = - [](xcb_xim_t *im, xcb_xic_t ic, uint32_t flag, char *str, - uint32_t length, uint32_t *keysym, size_t nKeySym, - void *user_data) { + [](xcb_xim_t* im, xcb_xic_t ic, uint32_t flag, char* str, + uint32_t length, uint32_t* keysym, size_t nKeySym, + void* user_data) { auto manager = static_cast<XcbXimInputMethodManager *>(user_data); if (flag & XCB_XIM_LOOKUP_KEYSYM) { @@ -91,7 +91,7 @@ xcb_xim_t *XcbXimInputMethodManager::GetXcbXim() { return im_; } void XcbXimInputMethodManager::DispatchCommit(xcb_xim_t *im, xcb_xic_t ic, std::string text) { - CRU_LOG_TAG_DEBUG("IC {} dispatch commit string: {}", ic, text); + CruLogDebug(kLogTag, "IC {} dispatch commit string: {}", ic, text); if (focus_context_) { focus_context_->composition_event_.Raise(nullptr); focus_context_->composition_end_event_.Raise(nullptr); @@ -104,7 +104,7 @@ bool XcbXimInputMethodManager::HandleXEvent(xcb_generic_event_t *event) { if (focus_context_ && focus_context_->ic_ && (((event->response_type & ~0x80) == XCB_KEY_PRESS) || ((event->response_type & ~0x80) == XCB_KEY_RELEASE))) { - CRU_LOG_TAG_DEBUG("Forward key event to XIM."); + CruLogDebug(kLogTag, "Forward key event to XIM."); xcb_xim_forward_event(im_, *focus_context_->ic_, (xcb_key_press_event_t *)event); application_->XcbFlush(); @@ -175,7 +175,7 @@ static void EmptyXimDestroyIcCallback(xcb_xim_t *im, xcb_xic_t ic, void XcbXimInputMethodContext::SetCandidateWindowPosition(const Point &point) { if (!ic_) return; - CRU_LOG_TAG_DEBUG("IC {} set candidate window position: {}", *ic_, point); + CruLogDebug(kLogTag, "IC {} set candidate window position: {}", *ic_, point); xcb_point_t spot; spot.x = point.x; @@ -212,7 +212,7 @@ void XcbXimInputMethodContext::CreateIc(xcb_window_t window) { auto XimCreateIcCallback = [](xcb_xim_t *im, xcb_xic_t ic, void *user_data) { auto context = static_cast<XcbXimInputMethodContext *>(user_data); context->ic_ = ic; - CRU_LOG_TAG_DEBUG("XIM IC {} is created.", ic); + CruLogDebug(kLogTag, "XIM IC {} is created.", ic); if (context->window_->HasFocus()) { context->SetFocus(); } @@ -223,27 +223,27 @@ void XcbXimInputMethodContext::CreateIc(xcb_window_t window) { xcb_xim_create_ic(manager_->GetXcbXim(), XimCreateIcCallback, this, XCB_XIM_XNInputStyle, &input_style, XCB_XIM_XNClientWindow, &window, XCB_XIM_XNFocusWindow, &window, NULL); - CRU_LOG_TAG_DEBUG("Create XIM IC."); + CruLogDebug(kLogTag, "Create XIM IC."); manager_->application_->XcbFlush(); } void XcbXimInputMethodContext::SetFocus() { manager_->focus_context_ = this; if (ic_) { - CRU_LOG_TAG_DEBUG("Focus XIM IC {}.", *ic_); + CruLogDebug(kLogTag, "Focus XIM IC {}.", *ic_); xcb_xim_set_ic_focus(manager_->GetXcbXim(), *ic_); manager_->application_->XcbFlush(); } } void XcbXimInputMethodContext::DestroyIc() { - auto destroy_callback = [](xcb_xim_t *im, xcb_xic_t ic, void *user_data) { - CRU_LOG_TAG_DEBUG("XIM IC {} is destroyed.", ic); + auto destroy_callback = [](xcb_xim_t* im, xcb_xic_t ic, void* user_data) { + CruLogDebug(kLogTag, "XIM IC {} is destroyed.", ic); }; if (!ic_) return; xcb_xim_destroy_ic(manager_->GetXcbXim(), *ic_, destroy_callback, this); - CRU_LOG_TAG_DEBUG("Destroy XIM IC {}.", *ic_); + CruLogDebug(kLogTag, "Destroy XIM IC {}.", *ic_); ic_ = std::nullopt; manager_->application_->XcbFlush(); } diff --git a/src/platform/gui/xcb/Window.cpp b/src/platform/gui/xcb/Window.cpp index 50f2c9aa..06d82de9 100644 --- a/src/platform/gui/xcb/Window.cpp +++ b/src/platform/gui/xcb/Window.cpp @@ -49,7 +49,7 @@ XcbWindow::XcbWindow(XcbUiApplication* application) PaintEvent_.AddSpyOnlyHandler([this] { if (xcb_window_) - CRU_LOG_TAG_DEBUG("{:#x} Paint event triggered.", *xcb_window_); + CruLogDebug(kLogTag, "{:#x} Paint event triggered.", *xcb_window_); }); } @@ -287,7 +287,7 @@ void XcbWindow::SetToForeground() { void XcbWindow::RequestRepaint() { if (!xcb_window_.has_value()) return; - CRU_LOG_TAG_DEBUG("{:#x} Repaint requested.", *xcb_window_); + CruLogDebug(kLogTag, "{:#x} Repaint requested.", *xcb_window_); // TODO: true throttle repaint_canceler_.Reset(application_->SetImmediate([this] { PaintEvent_.Raise(nullptr); @@ -412,8 +412,8 @@ void XcbWindow::HandleEvent(xcb_generic_event_t* event) { (xcb_configure_notify_event_t*)event; auto width = configure->width, height = configure->height; if (width != current_size_.width || height != current_size_.height) { - CRU_LOG_TAG_DEBUG("{:#x} Size changed {} x {}.", *xcb_window_, width, - height); + CruLogDebug(kLogTag, "{:#x} Size changed {} x {}.", *xcb_window_, width, + height); current_size_ = Size(width, height); assert(cairo_surface_); cairo_xcb_surface_set_size(cairo_surface_, width, height); |
