summaryrefslogtreecommitdiff
path: root/src/user/raleigh/window.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-07 12:16:12 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-07 12:16:12 -0500
commit348e1876d25320e6480f2795c9388b2bc080c743 (patch)
tree29fef9fa2a85ecd9565ea4a3cf78dba15c960750 /src/user/raleigh/window.cpp
parent76e39eac8cee2175ec62a191f7c91ca53857e80c (diff)
downloadportland-os-348e1876d25320e6480f2795c9388b2bc080c743.tar.gz
text entry, with cursor, but no keyboard
Diffstat (limited to 'src/user/raleigh/window.cpp')
-rw-r--r--src/user/raleigh/window.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/user/raleigh/window.cpp b/src/user/raleigh/window.cpp
index 41eb9ce..c23545b 100644
--- a/src/user/raleigh/window.cpp
+++ b/src/user/raleigh/window.cpp
@@ -3,6 +3,8 @@
#include <popups/info.h>
#include <knob/heap.h>
+#include <knob/format.h>
+
namespace raleigh {
window::window(widget &root, _pixel_t bg_color, bool (*on_close)(window &))
: handle(0), size(root.size), root(root), bg_color(bg_color),
@@ -11,7 +13,7 @@ namespace raleigh {
root.window_offset = coord(0, 0);
root.notify_window_change();
- pixbuf = (_pixel_t *)get_block(size.x * size.y * sizeof(_pixel_t));
+ pixbuf = new _pixel_t[size.x * size.y];
if (!pixbuf)
show_error_and_quitf("Failed to create %d byte pixel buffer\nfor requested %dx%d pixel window.", size.x * size.y * sizeof(_pixel_t), size.x, size.y);