summaryrefslogtreecommitdiffhomepage
path: root/dev/Modules/FB
diff options
context:
space:
mode:
authorAmlal <amlalelmahrouss@icloud.com>2024-12-17 10:42:10 +0100
committerAmlal <amlalelmahrouss@icloud.com>2024-12-17 10:42:10 +0100
commit03902f82edb1bac41631a3c2aeac866089ccaef8 (patch)
tree06ac75fdd12446915091a5307981459f048a9d5c /dev/Modules/FB
parent83cf6299a17d60ece650baa05069f657f783c911 (diff)
Kernel: Lots of fixes and improvements on the kernel's KWindow and Filesystem.
Diffstat (limited to 'dev/Modules/FB')
-rw-r--r--dev/Modules/FB/Accessibility.h10
-rw-r--r--dev/Modules/FB/KWindow.h22
2 files changed, 15 insertions, 17 deletions
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();
}