From 03902f82edb1bac41631a3c2aeac866089ccaef8 Mon Sep 17 00:00:00 2001 From: Amlal Date: Tue, 17 Dec 2024 10:42:10 +0100 Subject: Kernel: Lots of fixes and improvements on the kernel's KWindow and Filesystem. --- dev/Modules/FB/Accessibility.h | 10 ++-------- dev/Modules/FB/KWindow.h | 22 +++++++++++++--------- 2 files changed, 15 insertions(+), 17 deletions(-) (limited to 'dev/Modules') diff --git a/dev/Modules/FB/Accessibility.h b/dev/Modules/FB/Accessibility.h index 5b1ecbe3..843ad9a7 100644 --- a/dev/Modules/FB/Accessibility.h +++ b/dev/Modules/FB/Accessibility.h @@ -26,18 +26,12 @@ namespace CG public: ZKA_COPY_DELETE(UIAccessibilty); - STATIC UIAccessibilty& The() - { - STATIC UIAccessibilty the; - return the; - } - - Int64 Width() noexcept + static Int64 Width() noexcept { return kHandoverHeader->f_GOP.f_Width; } - Int64 Height() noexcept + static Int64 Height() noexcept { return kHandoverHeader->f_GOP.f_Height; } diff --git a/dev/Modules/FB/KWindow.h b/dev/Modules/FB/KWindow.h index 06cdd62e..a6d239b3 100644 --- a/dev/Modules/FB/KWindow.h +++ b/dev/Modules/FB/KWindow.h @@ -55,7 +55,7 @@ namespace CG { cg_init(); - CGDrawInRegion(cg_color(0x45, 0x00, 0x06), CG::UIAccessibilty::The().Height(), CG::UIAccessibilty::The().Width(), + CGDrawInRegion(cg_color(0x45, 0x00, 0x06), CG::UIAccessibilty::Height(), CG::UIAccessibilty::Width(), 0, 0); cg_fini(); @@ -150,11 +150,13 @@ namespace CG wnd[index]->w_needs_repaint = false; - if (UIAccessibilty::The().Width() < wnd[index]->w_x) + kcout << "Begin paint\r"; + + if (UIAccessibilty::Width() < wnd[index]->w_x) { - if ((wnd[index]->w_x - UIAccessibilty::The().Width()) > 1) + if ((wnd[index]->w_x - UIAccessibilty::Width()) > 1) { - wnd[index]->w_x -= wnd[index]->w_x - UIAccessibilty::The().Width(); + wnd[index]->w_x -= wnd[index]->w_x - UIAccessibilty::Width(); } else { @@ -162,11 +164,11 @@ namespace CG } } - if (UIAccessibilty::The().Height() < wnd[index]->w_y) + if (UIAccessibilty::Height() < wnd[index]->w_y) { - if ((wnd[index]->w_y - UIAccessibilty::The().Height()) > 1) + if ((wnd[index]->w_y - UIAccessibilty::Height()) > 1) { - wnd[index]->w_y -= wnd[index]->w_y - UIAccessibilty::The().Width(); + wnd[index]->w_y -= wnd[index]->w_y - UIAccessibilty::Width(); } else { @@ -174,11 +176,11 @@ namespace CG } } - ++cnt; - // Draw fake controls, just for the looks of it (WINDOW ONLY) if (wnd[index]->w_type == kWndFlagWindow) { + kcout << "Begin paint window\r"; + CGDrawBitMapInRegion(wnd[index]->display_ptr, wnd[index]->w_h, wnd[index]->w_w, wnd[index]->w_y, wnd[index]->w_x); CGDrawInRegion(cg_color(0xFF, 0xFF, 0xFF), wnd[index]->w_w, FLATCONTROLS_HEIGHT, wnd[index]->w_y, wnd[index]->w_x); @@ -234,6 +236,8 @@ namespace CG CGDrawWindowList(&wnd[index]->w_child_elements[child], 1); } + ++cnt; + cg_fini(); } -- cgit v1.2.3